Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use caplog to check if the test is working

Ania Warzechae578606afcfd
diff --git a/saleor/app/tests/test_app_tasks.py b/saleor/app/tests/test_app_tasks.py
index 7c2584166b..26a424009e 100644
--- a/saleor/app/tests/test_app_tasks.py
+++ b/saleor/app/tests/test_app_tasks.py
@@ -25,10 +25,14 @@ def test_install_app_task(app_installation):
def test_install_app_task_job_id_does_not_exist(caplog):
- # given & when
+ # given
nonexistent_job_id = 5435435345
+
+ # when
install_app_task(nonexistent_job_id, activate=True)
+ # then
+ assert not App.objects.exists()
assert caplog.record_tuples == [
(
ANY,
@@ -38,9 +42,6 @@ def test_install_app_task_job_id_does_not_exist(caplog):
)
]
- # then
- assert not App.objects.exists()
-
@pytest.mark.vcr
def test_install_app_task_wrong_format_of_target_token_url():