From 75b0994b77864f0bf98dfa9dde59965119905967 Mon Sep 17 00:00:00 2001 From: nucleogenic Date: Sun, 25 Sep 2022 18:15:35 +0100 Subject: [PATCH] Add missing asserts to API tests --- python/web/tests/api/test_auth.py | 2 +- python/web/tests/api/test_devices.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/web/tests/api/test_auth.py b/python/web/tests/api/test_auth.py index f54e4897..3a720ea9 100644 --- a/python/web/tests/api/test_auth.py +++ b/python/web/tests/api/test_auth.py @@ -40,4 +40,4 @@ def test_login_with_invalid_credentials(http_client_unauthenticated): # route("/logout") def test_logout(http_client): response = http_client.get("/logout") - response.status_code == 200 + assert response.status_code == 200 diff --git a/python/web/tests/api/test_devices.py b/python/web/tests/api/test_devices.py index 3b3ff56e..640f20bd 100644 --- a/python/web/tests/api/test_devices.py +++ b/python/web/tests/api/test_devices.py @@ -91,9 +91,9 @@ def test_detach_device(http_client, create_test_image): response_data = response.json() - response.status_code == 200 - response_data["status"] == STATUS_SUCCESS - response_data["messages"][0]["message"] == f"Detached SCSI ID {SCSI_ID} LUN 0" + assert response.status_code == 200 + assert response_data["status"] == STATUS_SUCCESS + assert response_data["messages"][0]["message"] == f"Detached SCSI ID {SCSI_ID} LUN 0" # route("/scsi/detach_all", methods=["POST"])