def test_safe_remove_fail(unlink): file_path = '/path/file.zip' unlink.side_effect = OSError() assert not mod.safe_remove(file_path) unlink.assert_called_once_with(file_path)
def test_safe_remove_success(unlink): file_path = '/path/file.zip' assert mod.safe_remove(file_path) unlink.assert_called_once_with(file_path)