mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 8 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue