not all test be fixed

This commit is contained in:
Matthias 2021-10-20 23:05:45 +02:00
parent d29e548c05
commit 48edaa9e2a
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -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"}