Make tests pass with current versions of things

This commit is contained in:
Shane McDonald
2020-06-15 20:54:14 -04:00
parent 241931309e
commit de82c613fc
11 changed files with 49 additions and 35 deletions

View File

@@ -2373,7 +2373,7 @@ def test_aquire_lock_open_fail_logged(logging_getLogger, os_open):
ProjectUpdate = tasks.RunProjectUpdate()
with pytest.raises(OSError, message='dummy message'):
with pytest.raises(OSError):
ProjectUpdate.acquire_lock(instance)
assert logger.err.called_with("I/O error({0}) while trying to open lock file [{1}]: {2}".format(3, 'this_file_does_not_exist', 'dummy message'))
@@ -2399,7 +2399,7 @@ def test_aquire_lock_acquisition_fail_logged(fcntl_lockf, logging_getLogger, os_
fcntl_lockf.side_effect = err
ProjectUpdate = tasks.RunProjectUpdate()
with pytest.raises(IOError, message='dummy message'):
with pytest.raises(IOError):
ProjectUpdate.acquire_lock(instance)
os_close.assert_called_with(3)
assert logger.err.called_with("I/O error({0}) while trying to aquire lock on file [{1}]: {2}".format(3, 'this_file_does_not_exist', 'dummy message'))