mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
not all test be fixed
This commit is contained in:
parent
d29e548c05
commit
48edaa9e2a
@ -155,7 +155,7 @@ class WebhookMessageTests(TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == HTTPStatus.OK
|
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):
|
def test_bad_hmac(self):
|
||||||
# delete token
|
# delete token
|
||||||
@ -186,7 +186,7 @@ class WebhookMessageTests(TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == HTTPStatus.OK
|
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):
|
def test_success(self):
|
||||||
response = self.client.post(
|
response = self.client.post(
|
||||||
@ -197,6 +197,6 @@ class WebhookMessageTests(TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == HTTPStatus.OK
|
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()
|
message = WebhookMessage.objects.get()
|
||||||
assert message.body == {"this": "is a message"}
|
assert message.body == {"this": "is a message"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user