mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
fix unit test mock errors on arch
This commit is contained in:
parent
fd8a1b797f
commit
14c711eeb3
@ -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…
Reference in New Issue
Block a user