mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #23550 from jfindlay/fix_rh_ip_test
additional mock for rh_ip_test test_build_bond
This commit is contained in:
commit
c1157cdaee
@ -46,13 +46,15 @@ class RhipTestCase(TestCase):
|
||||
|
||||
with patch.dict(rh_ip.__salt__, {'kmod.load':
|
||||
MagicMock(return_value=None)}):
|
||||
with patch.object(rh_ip, '_read_temp', return_value='A'):
|
||||
self.assertEqual(rh_ip.build_bond('iface', test='A'),
|
||||
'A')
|
||||
with patch.object(rh_ip, '_write_file_iface',
|
||||
return_value=None):
|
||||
with patch.object(rh_ip, '_read_temp', return_value='A'):
|
||||
self.assertEqual(rh_ip.build_bond('iface', test='A'),
|
||||
'A')
|
||||
|
||||
with patch.object(rh_ip, '_read_file', return_value='A'):
|
||||
self.assertEqual(rh_ip.build_bond('iface', test=None),
|
||||
'A')
|
||||
with patch.object(rh_ip, '_read_file', return_value='A'):
|
||||
self.assertEqual(rh_ip.build_bond('iface', test=None),
|
||||
'A')
|
||||
|
||||
def test_build_interface(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user