From 06fd48fe7ea2af103d9fea3a5a6b1c066abb643f Mon Sep 17 00:00:00 2001 From: anshg1214 Date: Fri, 26 Apr 2024 14:03:56 +0000 Subject: [PATCH] fix: Test --- listenbrainz/tests/integration/test_api_compat.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/listenbrainz/tests/integration/test_api_compat.py b/listenbrainz/tests/integration/test_api_compat.py index 6e9901b4e0..3aaf02078d 100644 --- a/listenbrainz/tests/integration/test_api_compat.py +++ b/listenbrainz/tests/integration/test_api_compat.py @@ -68,8 +68,8 @@ def test_complete_workflow_json(self): r = self.client.post( self.custom_url_for('api_compat.api_auth_approve'), - data=data, - headers={'Content-Type': 'application/json'} + data=json.dumps(data), + content_type="application/json" ) self.assert200(r) @@ -94,8 +94,7 @@ def test_complete_workflow_json(self): 'duration[0]': 300, 'timestamp[0]': int(time.time()), } - r = self.client.post(self.custom_url_for('api_compat.api_methods'), data=data, - headers={'Content-Type': 'application/json'}) + r = self.client.post(self.custom_url_for('api_compat.api_methods'), data=data) self.assert200(r) expected = {