Merge pull request #41615 from Ch3LL/fix_mac_clock

Fix get_hwclock_aix test on MacOSX
This commit is contained in:
Mike Place 2017-06-06 15:52:32 -05:00 committed by GitHub
commit 8f9ba1f258

View File

@ -309,8 +309,11 @@ class TimezoneModuleTestCase(TestCase, LoaderModuleMockMixin):
:return:
'''
# Incomplete
hwclock = 'localtime'
if not os.path.isfile('/etc/environment'):
hwclock = 'UTC'
with patch.dict(timezone.__grains__, {'os_family': ['AIX']}):
assert timezone.get_hwclock() == 'localtime'
assert timezone.get_hwclock() == hwclock
@patch('salt.utils.which', MagicMock(return_value=False))
@patch('os.path.exists', MagicMock(return_value=True))