Change call_args to call.args to reflect changes to MockFH

This commit is contained in:
Erik Johnson 2018-06-18 16:57:51 -05:00
parent 0c2cc07704
commit b73df0ab00
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -206,7 +206,7 @@ class TimezoneModuleTestCase(TestCase, LoaderModuleMockMixin):
with patch('salt.utils.files.fopen', mock_open()) as m_open:
assert timezone.set_zone(self.TEST_TZ)
fh_ = m_open.filehandles['/etc/timezone'][0]
assert fh_.call_args == ('/etc/timezone', 'w'), fh_.call_args
assert fh_.call.args == ('/etc/timezone', 'w'), fh_.call.args
assert fh_.write_calls == ['UTC', '\n'], fh_.write_calls
@skipIf(salt.utils.platform.is_windows(), 'os.symlink not available in Windows')
@ -223,7 +223,7 @@ class TimezoneModuleTestCase(TestCase, LoaderModuleMockMixin):
with patch('salt.utils.files.fopen', mock_open()) as m_open:
assert timezone.set_zone(self.TEST_TZ)
fh_ = m_open.filehandles['/etc/timezone'][0]
assert fh_.call_args == ('/etc/timezone', 'w'), fh_.call_args
assert fh_.call.args == ('/etc/timezone', 'w'), fh_.call.args
assert fh_.write_calls == ['UTC', '\n'], fh_.write_calls
@skipIf(salt.utils.platform.is_windows(), 'os.symlink not available in Windows')