refactor GET handler + impl JWTSigner
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#
|
||||
#######################################
|
||||
|
||||
URL="https://dev.thegux.fr"
|
||||
URL="http://localhost:9001"
|
||||
|
||||
for i in {0..10}
|
||||
do
|
||||
|
||||
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user