summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-10-24 17:37:24 +1100
committerAndrew Tridgell <tridge@samba.org>2011-11-02 15:26:54 +1100
commit4a6410df54fdbc8fb08b104c47010db507443def (patch)
tree02b7c571561cc217f89212db3fd4412d1b5742cc /source4
parent8dca18a71a813719e1c20b1ff909ed3aae32cf40 (diff)
downloadsamba-4a6410df54fdbc8fb08b104c47010db507443def.tar.gz
samba-4a6410df54fdbc8fb08b104c47010db507443def.tar.bz2
samba-4a6410df54fdbc8fb08b104c47010db507443def.zip
s4-dnsserver: Check the raised exception with assertRaises
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/dnsserver.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/source4/scripting/python/samba/tests/dcerpc/dnsserver.py b/source4/scripting/python/samba/tests/dcerpc/dnsserver.py
index d185efb5b0..33c5cf7d5e 100644
--- a/source4/scripting/python/samba/tests/dcerpc/dnsserver.py
+++ b/source4/scripting/python/samba/tests/dcerpc/dnsserver.py
@@ -166,16 +166,14 @@ class DnsserverTests(RpcInterfaceTestCase):
None,
del_rec_buf)
- try:
- buflen, result = self.conn.DnssrvEnumRecords2(client_version,
- 0,
- self.server,
- self.zone,
- name,
- None,
- record_type,
- select_flags,
- None,
- None)
- except RuntimeError, e:
- self.assertEquals("(9714, 'WERR_DNS_ERROR_NAME_DOES_NOT_EXIST')", str(e))
+ self.assertRaises(RuntimeError, self.conn.DnssrvEnumRecords2,
+ client_version,
+ 0,
+ self.server,
+ self.zone,
+ name,
+ None,
+ record_type,
+ select_flags,
+ None,
+ None)