Refactoring: auth tests pass

This commit is contained in:
lvrossem
2023-04-16 07:15:03 -06:00
parent d38d4d5c16
commit 0bf764a0f4
14 changed files with 116 additions and 93 deletions

View File

@@ -13,4 +13,15 @@ client = TestClient(app)
username = "user1"
password = "password"
avatar = "lion"
avatar_index = 1
async def register_user():
response = client.post(
"/register",
headers={"Content-Type": "application/json"},
json={"username": username, "password": password, "avatar_index": avatar_index},
)
assert response.status_code == 200
return response.json()["access_token"]