Skip to content

Commit d01bbf4

Browse files
committed
adjust tests
1 parent 31496fe commit d01bbf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/unit/test_projects.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def test_import_no_zip(get_test_project: Generator[projects.Project]) -> None:
139139
pytest.skip("No zip import in Community Build")
140140
assert get_test_project.import_zip(asynchronous=False) == "FAILED/ZIP_MISSING"
141141
get_test_project.key = "non-existing"
142-
res = get_test_project.import_zip(asynchronous=False)
143-
assert res.startswith("FAILED/ZIP_MISSING")
142+
with pytest.raises(exceptions.ObjectNotFound):
143+
get_test_project.import_zip(asynchronous=False)
144144

145145

146146
def test_monorepo() -> None:
@@ -392,6 +392,7 @@ def test_import_zips() -> None:
392392
res = projects.import_zips(tutil.SQ, project_list=proj_list)
393393
assert len(res) == len(proj_list)
394394
assert sum(1 for r in res.values() if r["importStatus"] != "SUCCESS") == len(proj_list)
395+
projects.Project.get_object(tutil.SQ, "non-existing").delete()
395396

396397

397398
def test_export_zips() -> None:

0 commit comments

Comments
 (0)