summaryrefslogtreecommitdiffstats
path: root/python/samba/tests/dns.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/samba/tests/dns.py')
-rw-r--r--python/samba/tests/dns.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py
index ac946af459..92ac876ff3 100644
--- a/python/samba/tests/dns.py
+++ b/python/samba/tests/dns.py
@@ -888,6 +888,14 @@ class TestZones(DNSTest):
self.rpc_conn = dnsserver.dnsserver("ncacn_ip_tcp:%s" % (self.server),
self.lp, self.creds)
+ def tearDown(self):
+ super(TestZones, self).tearDown()
+ try:
+ self.delete_zone(self.zone)
+ except RuntimeError, (num, string):
+ if num != 9601: #WERR_DNS_ERROR_ZONE_DOES_NOT_EXIST
+ raise
+
def create_zone(self, zone):
zone_create = dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN()
zone_create.pszZoneName = zone