class TestZoneArglessDriver(TestCase): def setUp(self): MockDNSDriverArgless.install(self) self.driver = MockDNSDriverArgless() def test_empty_records_list(self): self.assertEqual(len(self.driver.list_zones()), 0) self.up(""" new Zone as myzone: driver: DUMMY domain: example.com records: [] """) zones = self.driver.list_zones() self.assertEqual(len(zones), 1) # FIXME: Investigate rstrip... self.assertEqual(zones[0].domain.rstrip("."), "example.com") self.assertEqual(zones[0].list_records(), [])
def setUp(self): MockDNSDriverArgless.install(self) self.driver = MockDNSDriverArgless()