If setUp() fails (and here we have a big .setUp), .tearDown is not run,
and that can leave the zone undeleted, breaking all the other tests who
expect to be able to recreate it.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
self.testip = "192.168.0.193"
self.testip2 = "192.168.0.194"
+ self.addCleanup(self.deleteZone)
self.addZone()
# Note: SOA types don't work (and shouldn't), as we only have one zone per DNS record.
"SRV": bad_srv
}
- def tearDown(self):
- self.deleteZone()
- super(DnsCmdTestCase, self).tearDown()
-
def resetZone(self):
self.deleteZone()
self.addZone()