equal
deleted
inserted
replaced
163 ) |
163 ) |
164 |
164 |
165 with self.assertRaises(zone.HostZoneError): |
165 with self.assertRaises(zone.HostZoneError): |
166 self.assertZoneEquals(zone.host_forward(h, 'domain'), { }) |
166 self.assertZoneEquals(zone.host_forward(h, 'domain'), { }) |
167 |
167 |
|
168 def testHostFQDN(self): |
|
169 h = Host.build('host.example.net', None, |
|
170 ip = '192.0.2.3', |
|
171 ) |
|
172 |
|
173 self.assertZoneEquals(zone.host_forward(h, 'example.com'), { |
|
174 |
|
175 }) |
|
176 |
168 def testHostDelegate(self): |
177 def testHostDelegate(self): |
169 h = Host.build('host', 'example.com', |
178 h = Host.build('host', 'example.com', |
170 forward = 'host.example.net', |
179 forward = 'host.example.net', |
171 ) |
180 ) |
172 |
181 |
353 |
362 |
354 }) |
363 }) |
355 |
364 |
356 self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8:1::/64'))), { |
365 self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8:1::/64'))), { |
357 |
366 |
|
367 }) |
|
368 |
|
369 def testHostFQDN(self): |
|
370 h = Host.build('host.example.net', None, |
|
371 ip = '192.0.2.3', |
|
372 ip6 = '2001:db8::192.0.2.3', |
|
373 ) |
|
374 |
|
375 self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.2.1/24'))), { |
|
376 ('3', 'PTR'): ['host.example.net.'], |
|
377 |
|
378 }) |
|
379 |
|
380 self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8::/64'))), { |
|
381 ('3.0.2.0.0.0.0.c.0.0.0.0.0.0.0.0', 'PTR'): ['host.example.net.'], |
358 }) |
382 }) |
359 |
383 |
360 def testHostDelegate(self): |
384 def testHostDelegate(self): |
361 h = Host.build('host', 'example.com', |
385 h = Host.build('host', 'example.com', |
362 ip = '192.0.2.1', |
386 ip = '192.0.2.1', |