mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
Fix task unit test
This commit is contained in:
@@ -2171,6 +2171,7 @@ def test_aquire_lock_acquisition_fail_logged(fcntl_flock, logging_getLogger, os_
|
|||||||
|
|
||||||
instance = mock.Mock()
|
instance = mock.Mock()
|
||||||
instance.get_lock_file.return_value = 'this_file_does_not_exist'
|
instance.get_lock_file.return_value = 'this_file_does_not_exist'
|
||||||
|
instance.cancel_flag = False
|
||||||
|
|
||||||
os_open.return_value = 3
|
os_open.return_value = 3
|
||||||
|
|
||||||
@@ -2180,7 +2181,6 @@ def test_aquire_lock_acquisition_fail_logged(fcntl_flock, logging_getLogger, os_
|
|||||||
fcntl_flock.side_effect = err
|
fcntl_flock.side_effect = err
|
||||||
|
|
||||||
ProjectUpdate = tasks.RunProjectUpdate()
|
ProjectUpdate = tasks.RunProjectUpdate()
|
||||||
|
|
||||||
with pytest.raises(IOError, message='dummy message'):
|
with pytest.raises(IOError, message='dummy message'):
|
||||||
ProjectUpdate.acquire_lock(instance)
|
ProjectUpdate.acquire_lock(instance)
|
||||||
os_close.assert_called_with(3)
|
os_close.assert_called_with(3)
|
||||||
|
|||||||
Reference in New Issue
Block a user