Fix one broken locale unittest

This commit is contained in:
Mike Place 2016-08-20 22:42:23 +09:00
parent f923ba82b5
commit 2452752fa6

View File

@ -84,7 +84,9 @@ class LocalemodTestCase(TestCase):
self.assertFalse(localemod.set_locale('l'))
with patch.dict(localemod.__grains__, {'os_family': ['A']}):
self.assertRaises(CommandExecutionError, localemod.set_locale, 'A')
with patch.dict(localemod.__salt__, {'cmd.retcode': MagicMock(return_value=0)}):
with patch('salt.utils.systemd.booted', return_value=False):
self.assertRaises(CommandExecutionError, localemod.set_locale, 'A')
def test_avail(self):
'''