mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
typo :)
This commit is contained in:
parent
c77bd2a11c
commit
c4cee5c5cf
@ -8,7 +8,7 @@ pytestmark = pytest.mark.anyio
|
|||||||
|
|
||||||
# TODO: parametrize test with diff urls
|
# TODO: parametrize test with diff urls
|
||||||
async def test_add_user(client: AsyncClient):
|
async def test_add_user(client: AsyncClient):
|
||||||
payload = {"email": "rancher@grassroots.com", "first_name": "Joe", "last_name": "Garcia", "password": "s1lly"}
|
payload = {"email": "joe@grillazz.com", "first_name": "Joe", "last_name": "Garcia", "password": "s1lly"}
|
||||||
response = await client.post("/user/", json=payload)
|
response = await client.post("/user/", json=payload)
|
||||||
assert response.status_code == status.HTTP_201_CREATED
|
assert response.status_code == status.HTTP_201_CREATED
|
||||||
claimset = jwt.decode(response.json()["access_token"], options={"verify_signature": False})
|
claimset = jwt.decode(response.json()["access_token"], options={"verify_signature": False})
|
||||||
@ -19,7 +19,7 @@ async def test_add_user(client: AsyncClient):
|
|||||||
|
|
||||||
# TODO: parametrize test with diff urls including 404 and 401
|
# TODO: parametrize test with diff urls including 404 and 401
|
||||||
async def test_get_token(client: AsyncClient):
|
async def test_get_token(client: AsyncClient):
|
||||||
payload = {"email": "rancher@grassroots.com", "password": "s1lly"}
|
payload = {"email": "joe@grillazz.com", "password": "s1lly"}
|
||||||
response = await client.post("/user/token", json=payload)
|
response = await client.post("/user/token", json=payload)
|
||||||
assert response.status_code == status.HTTP_201_CREATED
|
assert response.status_code == status.HTTP_201_CREATED
|
||||||
claimset = jwt.decode(response.json()["access_token"], options={"verify_signature": False})
|
claimset = jwt.decode(response.json()["access_token"], options={"verify_signature": False})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user