Esempio n. 1
0
def test_collision_check_raises(file_map):
    with mock.patch('os.path.exists') as exists:
        exists.return_value = True
        with pytest.raises(blind.ConflictError):
            result = blind._collision_check(file_map)
Esempio n. 2
0
def test_collision_check_raises(file_map):
    with mock.patch('os.path.exists') as exists:
        exists.return_value = True
        with pytest.raises(blind.ConflictError):
            result = blind._collision_check(file_map)
Esempio n. 3
0
def test_collision_check(file_map):
    with mock.patch('os.path.exists') as exists:
        exists.return_value = False
        result = blind._collision_check(file_map)
        exists.assert_any_call('one.txt.masked')
        exists.assert_any_call('two.txt.masked')
Esempio n. 4
0
def test_collision_check(file_map):
    with mock.patch('os.path.exists') as exists:
        exists.return_value = False
        result = blind._collision_check(file_map)
        exists.assert_any_call('one.txt.masked')
        exists.assert_any_call('two.txt.masked')