From 48edaa9e2a441894d6063f6fabe49e7814c12323 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 20 Oct 2021 23:05:45 +0200 Subject: [PATCH] not all test be fixed --- InvenTree/common/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/common/tests.py b/InvenTree/common/tests.py index a5d3014f69..2fbb6b902f 100644 --- a/InvenTree/common/tests.py +++ b/InvenTree/common/tests.py @@ -155,7 +155,7 @@ class WebhookMessageTests(TestCase): ) assert response.status_code == HTTPStatus.OK - assert response.content == WebhookView.model_class.MESSAGE_OK + assert str(response.content, 'utf-8') == WebhookView.model_class.MESSAGE_OK def test_bad_hmac(self): # delete token @@ -186,7 +186,7 @@ class WebhookMessageTests(TestCase): ) assert response.status_code == HTTPStatus.OK - assert json.loads(response.content)['message'] == WebhookView.model_class.MESSAGE_OK + assert str(response.content, 'utf-8') == WebhookView.model_class.MESSAGE_OK def test_success(self): response = self.client.post( @@ -197,6 +197,6 @@ class WebhookMessageTests(TestCase): ) assert response.status_code == HTTPStatus.OK - assert json.loads(response.content)['message'] == WebhookView.model_class.MESSAGE_OK + assert str(response.content, 'utf-8') == WebhookView.model_class.MESSAGE_OK message = WebhookMessage.objects.get() assert message.body == {"this": "is a message"}