pvl/hosts/tests.py
changeset 502 ac4e0f2df80c
parent 501 41b362e6074b
child 503 a56456f901e8
equal deleted inserted replaced
501:41b362e6074b 502:ac4e0f2df80c
    74             'ethernet.eth0': '00:11:22:33:44:55',
    74             'ethernet.eth0': '00:11:22:33:44:55',
    75         })
    75         })
    76 
    76 
    77         self.assertHostEqual(host, 'foo@test', dict(
    77         self.assertHostEqual(host, 'foo@test', dict(
    78                 ethernet    = { 'eth0': '00:11:22:33:44:55' }
    78                 ethernet    = { 'eth0': '00:11:22:33:44:55' }
       
    79         ))
       
    80 
       
    81     def testApplyHostConfigDictMulti(self):
       
    82         host = config.apply_host(self.options, 'foo', 'test', {
       
    83             'ethernet.eth0': '00:11:22:33:44:55',
       
    84             'ethernet.eth1': '00:11:22:33:44:66',
       
    85         })
       
    86 
       
    87         self.assertHostEqual(host, 'foo@test', dict(
       
    88                 ethernet    = {
       
    89                     'eth0': '00:11:22:33:44:55',
       
    90                     'eth1': '00:11:22:33:44:66',
       
    91                 }
    79         ))
    92         ))
    80    
    93    
    81     def testApplyHostsConfigError(self):
    94     def testApplyHostsConfigError(self):
    82         with self.assertRaises(config.HostConfigError):
    95         with self.assertRaises(config.HostConfigError):
    83             config.apply_host(self.options, 'foo', 'test', {
    96             config.apply_host(self.options, 'foo', 'test', {