pvl.hosts.tests: test multi-value dicts for host
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 16:37:24 +0200
changeset 502 ac4e0f2df80c
parent 501 41b362e6074b
child 503 a56456f901e8
pvl.hosts.tests: test multi-value dicts for host
pvl/hosts/tests.py
--- a/pvl/hosts/tests.py	Thu Feb 26 16:36:46 2015 +0200
+++ b/pvl/hosts/tests.py	Thu Feb 26 16:37:24 2015 +0200
@@ -77,6 +77,19 @@
         self.assertHostEqual(host, 'foo@test', dict(
                 ethernet    = { 'eth0': '00:11:22:33:44:55' }
         ))
+
+    def testApplyHostConfigDictMulti(self):
+        host = config.apply_host(self.options, 'foo', 'test', {
+            'ethernet.eth0': '00:11:22:33:44:55',
+            'ethernet.eth1': '00:11:22:33:44:66',
+        })
+
+        self.assertHostEqual(host, 'foo@test', dict(
+                ethernet    = {
+                    'eth0': '00:11:22:33:44:55',
+                    'eth1': '00:11:22:33:44:66',
+                }
+        ))
    
     def testApplyHostsConfigError(self):
         with self.assertRaises(config.HostConfigError):