示例#1
0
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(), [])
示例#2
0
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(), [])
示例#3
0
 def setUp(self):
     MockDNSDriverArgless.install(self)
     self.driver = MockDNSDriverArgless()
示例#4
0
 def setUp(self):
     MockDNSDriverArgless.install(self)
     self.driver = MockDNSDriverArgless()