--- a/pvl/hosts/tests.py Thu Feb 26 15:26:26 2015 +0200
+++ b/pvl/hosts/tests.py Thu Feb 26 15:29:03 2015 +0200
@@ -246,7 +246,7 @@
)
]
- self.assertZoneEquals(zone.apply_hosts_forward(self.options, hosts, 'domain'), {
+ self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), {
('foo', 'A'): ['192.0.2.1'],
('foo', 'AAAA'): ['2001:db8::c000:201'],
('test', 'CNAME'): ['foo'],
@@ -264,7 +264,7 @@
]
with self.assertRaises(zone.HostZoneError):
- self.assertZoneEquals(zone.apply_hosts_forward(self.options, hosts, 'domain'), { })
+ self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), { })
def testHostsAliasConflict(self):
hosts = [
@@ -279,11 +279,11 @@
# with A first
with self.assertRaises(zone.HostZoneError):
- self.assertZoneEquals(zone.apply_hosts_forward(self.options, hosts, 'domain'), { })
+ self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), { })
# also with CNAME first
with self.assertRaises(zone.HostZoneError):
- self.assertZoneEquals(zone.apply_hosts_forward(self.options, reversed(hosts), 'domain'), { })
+ self.assertZoneEquals(zone.apply_hosts_forward(reversed(hosts), 'domain'), { })
def testHostsAlias4Conflict(self):
hosts = [
@@ -297,7 +297,7 @@
]
with self.assertRaises(zone.HostZoneError):
- self.assertZoneEquals(zone.apply_hosts_forward(self.options, hosts, 'domain'), { })
+ self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), { })
class TestReverseZone(TestZoneMixin, unittest.TestCase):
@@ -397,7 +397,7 @@
]
with self.assertRaises(zone.HostZoneError):
- self.assertZoneEquals(zone.apply_hosts_reverse(self.options, hosts, ipaddr.IPNetwork('192.0.2.1/24')), { })
+ self.assertZoneEquals(zone.apply_hosts_reverse(hosts, ipaddr.IPNetwork('192.0.2.1/24')), { })
def testHostsGenerateUnknown(self):
hosts = [
@@ -409,9 +409,10 @@
),
]
- self.options.unknown_host = 'ufc'
- self.options.hosts_domain = 'domain'
- self.assertZoneEquals(zone.apply_hosts_reverse(self.options, hosts, ipaddr.IPNetwork('192.0.2.1/29')), {
+ self.assertZoneEquals(zone.apply_hosts_reverse(hosts, ipaddr.IPNetwork('192.0.2.1/29'),
+ unknown_host = 'ufc',
+ unknown_domain = 'domain',
+ ), {
('1', 'PTR'): ['foo.domain.'],
('2', 'PTR'): ['ufc.domain.'],
('3', 'PTR'): ['ufc.domain.'],