pvl/hosts/tests.py
changeset 449 a19438b781d5
parent 447 6f0357759e9b
child 451 d302b4957b07
equal deleted inserted replaced
448:5ab0ec8200c3 449:a19438b781d5
    51         ]
    51         ]
    52 
    52 
    53         self.assertHostsEqual(config.apply_hosts_file(self.options, conf_file), expected)
    53         self.assertHostsEqual(config.apply_hosts_file(self.options, conf_file), expected)
    54 
    54 
    55     def testApplyHostsExpand(self):
    55     def testApplyHostsExpand(self):
    56         self.assertHostsEqual(config.apply_host_config(self.options, 'etc/hosts/asdf', 'asdf', 'asdf{1-3}', ip='10.100.100.$'), [
    56         self.assertHostsEqual(config.apply_host_config(self.options, 'asdf', 'asdf{1-3}', ip='10.100.100.$'), [
    57                 ('asdf1@asdf', dict(ip=ipaddr.IPAddress('10.100.100.1'))),
    57                 ('asdf1@asdf', dict(ip=ipaddr.IPAddress('10.100.100.1'))),
    58                 ('asdf2@asdf', dict(ip=ipaddr.IPAddress('10.100.100.2'))),
    58                 ('asdf2@asdf', dict(ip=ipaddr.IPAddress('10.100.100.2'))),
    59                 ('asdf3@asdf', dict(ip=ipaddr.IPAddress('10.100.100.3'))),
    59                 ('asdf3@asdf', dict(ip=ipaddr.IPAddress('10.100.100.3'))),
    60         ])
    60         ])
    61 
    61