pvl/hosts/tests.py
changeset 470 ac334a55eebc
parent 469 cd1f1b51f3a0
child 471 e4b4458d8061
--- 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()