mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
fix unit tests
This commit is contained in:
parent
428baa9bce
commit
f30f5c8a25
@ -44,6 +44,7 @@ class LocalemodTestCase(TestCase):
|
||||
Test for Get the current system locale
|
||||
'''
|
||||
with patch.dict(localemod.__context__, {'salt.utils.systemd.booted': True}):
|
||||
with patch.dict(localemod.__grains__, {'os_family': ['Unknown']}):
|
||||
localemod.HAS_DBUS = True
|
||||
with patch.object(localemod,
|
||||
'_parse_dbus_locale',
|
||||
@ -82,6 +83,7 @@ class LocalemodTestCase(TestCase):
|
||||
Test for Sets the current system locale
|
||||
'''
|
||||
with patch.dict(localemod.__context__, {'salt.utils.systemd.booted': True}):
|
||||
with patch.dict(localemod.__grains__, {'os_family': ['Unknown']}):
|
||||
with patch.object(localemod, '_localectl_set', return_value=True):
|
||||
self.assertTrue(localemod.set_locale('l'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user