--- a/pvl/hosts/tests.py Wed Feb 25 15:09:51 2015 +0200
+++ b/pvl/hosts/tests.py Wed Feb 25 15:12:55 2015 +0200
@@ -212,6 +212,19 @@
('test', 'CNAME'): ['host'],
})
+ def testHostLocation(self):
+ h = host.Host.build('host', 'domain',
+ ip = '192.0.2.1',
+ location = 'test',
+ )
+
+ self.assertEquals(h.location, ('test', 'domain'))
+
+ self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+ ('host', 'A'): ['192.0.2.1'],
+ ('test', 'CNAME'): ['host'],
+ })
+
class TestReverseZone(TestZoneMixin, unittest.TestCase):
def setUp(self):
self.options = Options()