pvl/hosts/tests.py
changeset 510 368a568412ed
parent 509 ae53114766fc
child 511 99043eab9140
--- a/pvl/hosts/tests.py	Thu Feb 26 17:40:12 2015 +0200
+++ b/pvl/hosts/tests.py	Thu Feb 26 18:07:03 2015 +0200
@@ -112,7 +112,7 @@
                 ('bar@test', dict(ip=ipaddr.IPAddress('127.0.0.2'))),
         ]
 
-        self.assertHostsEqual(config.apply_hosts_file(self.options, conf_file), expected)
+        self.assertHostsEqual(config.apply_hosts_config(self.options, conf_file), expected)
 
     def testApplyIncludes(self):
         self.assertHostsEqual(config.apply_hosts_files(self.options, ['etc/hosts/includes.test']), [
@@ -127,6 +127,16 @@
                 )),
         ])
 
+    def testApplyDirectory(self):
+        self.assertHostsEqual(config.apply_hosts_files(self.options, ['etc/hosts/included.test/']), [
+                ('foo@included.test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.1'),
+                )),
+                ('bar@included.test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.2'),
+                )),
+        ])
+
     def testApply(self):
         self.assertHostsEqual(config.apply(self.options, ['etc/hosts/test']), [
                 ('foo@test', dict(