mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #43840 from twangboy/win_fix_test_augeas
Fix `unit.states.test_augeas` for Windows
This commit is contained in:
commit
1f52546eab
1 changed files with 2 additions and 1 deletions
|
@ -140,7 +140,8 @@ class AugeasTestCase(TestCase, LoaderModuleMockMixin):
|
|||
'augeas.method_map': self.mock_method_map}
|
||||
with patch.dict(augeas.__salt__, mock_dict_):
|
||||
mock_filename = MagicMock(return_value='/etc/services')
|
||||
with patch.object(augeas, '_workout_filename', mock_filename):
|
||||
with patch.object(augeas, '_workout_filename', mock_filename), \
|
||||
patch('os.path.isfile', MagicMock(return_value=True)):
|
||||
with patch('salt.utils.fopen', MagicMock(mock_open)):
|
||||
mock_diff = MagicMock(return_value=['+ zabbix-agent'])
|
||||
with patch('difflib.unified_diff', mock_diff):
|
||||
|
|
Loading…
Add table
Reference in a new issue