Esempio n. 1
0
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)
Esempio n. 2
0
def test_safe_remove_success(unlink):
    file_path = '/path/file.zip'
    assert mod.safe_remove(file_path)
    unlink.assert_called_once_with(file_path)