Refactoring: auth tests pass
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user