mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixing failing test_set_hwclock_aix test.
This commit is contained in:
parent
ccb0acc958
commit
7c472fed51
1 changed files with 5 additions and 4 deletions
|
@ -349,10 +349,11 @@ class TimezoneModuleTestCase(TestCase, LoaderModuleMockMixin):
|
|||
Test set hwclock on AIX
|
||||
:return:
|
||||
'''
|
||||
with patch.dict(timezone.__grains__, {'os_family': ['AIX']}):
|
||||
with self.assertRaises(SaltInvocationError):
|
||||
assert timezone.set_hwclock('forty two')
|
||||
assert timezone.set_hwclock('UTC')
|
||||
for osfamily in ['AIX', 'NILinuxRT']:
|
||||
with patch.dict(timezone.__grains__, {'os_family': osfamily}):
|
||||
with self.assertRaises(SaltInvocationError):
|
||||
assert timezone.set_hwclock('forty two')
|
||||
assert timezone.set_hwclock('UTC')
|
||||
|
||||
@skipIf(salt.utils.is_windows(), 'os.symlink not available in Windows')
|
||||
@patch('salt.utils.which', MagicMock(return_value=False))
|
||||
|
|
Loading…
Add table
Reference in a new issue