Skip to content

Commit d1be9c9

Browse files
Fix test that should fail
1 parent 7be442c commit d1be9c9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_sync.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ def test_successful_sync(tmp_path, base_config):
7777

7878
def test_failing_sync(tmp_path, base_config):
7979
# Try to sync to non existent area
80-
dest = tmp_path / "destination"
81-
os.mkdir(dest)
80+
dest = Path("/non-existent/destination")
8281

8382
_deploy_config(base_config, tmp_path)
83+
with pytest.raises(Exception):
84+
with patch.multiple(
85+
"deploy.sync", _format_dest_path=lambda area,path: mocked_format_dest_path(area,path,dest), _ensure_dir=always_pass
86+
):
87+
do_sync(configpath=tmp_path, config=base_config, extra_scripts=tmp_path, prefix=tmp_path)
8488

85-
with patch.multiple(
86-
"deploy.sync", _format_dest_path=lambda area,path: mocked_format_dest_path(area,path,dest), _ensure_dir=always_pass
87-
):
88-
do_sync(configpath=tmp_path, config=base_config, extra_scripts=tmp_path, prefix=tmp_path)

0 commit comments

Comments
 (0)