From 53441af069bce2621756c5d1f01b6a5e4703a9ee Mon Sep 17 00:00:00 2001 From: Ishan Sodani Date: Fri, 24 Jan 2025 00:51:00 +0530 Subject: [PATCH] fix : fixed issue with json body handling in test_create_answer function --- test/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.py b/test/test.py index 6a654fe..9fa0e7b 100644 --- a/test/test.py +++ b/test/test.py @@ -39,7 +39,7 @@ def test_create_answer(): body = {"user_id": 1, "answers": [{"question_id": 1, "alternative_id": 2}, { "question_id": 2, "alternative_id": 2}, {"question_id": 2, "alternative_id": 2}]} body = json.dumps(body) - response = client.post('/answer', data=body) + response = client.post('/answer', json=body) assert response.status_code == 201