mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #23781 from jfindlay/fix_locale_tests
fix unit test mock errors on arch
This commit is contained in:
commit
982f87316d
1 changed files with 4 additions and 2 deletions
|
@ -146,7 +146,8 @@ class LocalemodTestCase(TestCase):
|
|||
'''
|
||||
ret = {'stdout': 'saltines', 'stderr': 'biscuits', 'retcode': 0, 'pid': 1337}
|
||||
with patch.dict(localemod.__salt__,
|
||||
{'cmd.run_all': MagicMock(return_value=ret)}):
|
||||
{'cmd.run_all': MagicMock(return_value=ret),
|
||||
'file.replace': MagicMock()}):
|
||||
self.assertTrue(localemod.gen_locale('en_US.UTF-8'))
|
||||
|
||||
@patch('salt.utils.which', MagicMock(return_value='/some/dir/path'))
|
||||
|
@ -157,7 +158,8 @@ class LocalemodTestCase(TestCase):
|
|||
'''
|
||||
ret = {'stdout': 'saltines', 'stderr': 'biscuits', 'retcode': 0, 'pid': 1337}
|
||||
with patch.dict(localemod.__salt__,
|
||||
{'cmd.run_all': MagicMock(return_value=ret)}):
|
||||
{'cmd.run_all': MagicMock(return_value=ret),
|
||||
'file.replace': MagicMock()}):
|
||||
self.assertEqual(localemod.gen_locale('en_US.UTF-8', verbose=True), ret)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue