From 69f71b1ed9b1be832af661e0d11d8bd54a696d10 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 21 Jun 2022 03:58:52 +0300 Subject: Update tests: Ensure errors return status code 400 --- tests/qc_app/test_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/qc_app/test_entry.py b/tests/qc_app/test_entry.py index 31c43e1..61c5db0 100644 --- a/tests/qc_app/test_entry.py +++ b/tests/qc_app/test_entry.py @@ -35,7 +35,7 @@ def test_post_notifies_errors_if_no_data_is_provided(client): THEN: ensure the system responds woit the appropriate error messages """ response = client.post("/", data={}) - assert response.status_code == 200 + assert response.status_code == 400 assert ( b'Invalid file type provided.' in response.data) @@ -80,5 +80,5 @@ def test_post_with_missing_or_invalid_data(client, request_data,error_message): THEN: ensure that the system responds with the appropriate error message """ response = client.post("/", data=request_data) - assert response.status_code == 200 + assert response.status_code == 400 assert error_message in response.data -- cgit v1.2.3