refactor GET handler + impl JWTSigner

This commit is contained in:
2022-10-13 16:06:27 +00:00
parent 7073a4b88e
commit 6166310283
10 changed files with 100 additions and 33 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ from datetime import datetime
from unittest import TestCase
URL = "https://dev.thegux.fr"
URL = "http://localhost:9001"
class TestResponse(TestCase):
@@ -62,7 +62,7 @@ class TestResponse(TestCase):
resp = requests.post(
URL + "/get/", json={"username": "tutu", "password": "titi"}
)
self.assertEqual(resp.status_code, 403, "bas status code returned")
self.assertEqual(resp.status_code, 403, "bad status code returned")
self.assertIsNotNone(resp.json(), "response data must not be empty")
self.assertEqual(
resp.json()["error"],