|
|
@ -197,7 +197,7 @@ def test_rename_perms_fail_temp_succeeds(atomic_am, atomic_mocks, fake_stat, moc
|
|
|
|
mock_context = atomic_am.selinux_default_context.return_value
|
|
|
|
mock_context = atomic_am.selinux_default_context.return_value
|
|
|
|
atomic_mocks['path_exists'].return_value = False
|
|
|
|
atomic_mocks['path_exists'].return_value = False
|
|
|
|
atomic_mocks['rename'].side_effect = [OSError(errno.EPERM, 'failing with EPERM'), None]
|
|
|
|
atomic_mocks['rename'].side_effect = [OSError(errno.EPERM, 'failing with EPERM'), None]
|
|
|
|
atomic_mocks['stat'].return_value = [fake_stat, fake_stat, fake_stat]
|
|
|
|
atomic_mocks['stat'].return_value = fake_stat
|
|
|
|
atomic_mocks['stat'].side_effect = None
|
|
|
|
atomic_mocks['stat'].side_effect = None
|
|
|
|
atomic_mocks['mkstemp'].return_value = (None, '/path/to/tempfile')
|
|
|
|
atomic_mocks['mkstemp'].return_value = (None, '/path/to/tempfile')
|
|
|
|
atomic_mocks['mkstemp'].side_effect = None
|
|
|
|
atomic_mocks['mkstemp'].side_effect = None
|
|
|
|