# HG changeset patch # User Tero Marttila # Date 1424961444 -7200 # Node ID ac4e0f2df80c4c55280adf4145b881a54343c1bc # Parent 41b362e6074b555ca9497e3518d190726b1fd89a pvl.hosts.tests: test multi-value dicts for host diff -r 41b362e6074b -r ac4e0f2df80c 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):