Refactoring: auth tests pass
This commit is contained in:
@@ -5,22 +5,10 @@ from fastapi.testclient import TestClient
|
||||
|
||||
from src.enums import MinigameEnum
|
||||
from src.main import app, get_db
|
||||
from tests.base import avatar, client, password, username
|
||||
from tests.base import avatar_index, client, password, username, register_user
|
||||
from tests.config.database import clear_db, override_get_db
|
||||
|
||||
|
||||
async def register_user():
|
||||
response = client.post(
|
||||
"/register",
|
||||
headers={"Content-Type": "application/json"},
|
||||
json={"username": username, "password": password, "avatar": avatar},
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
return response.json()["access_token"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_put_highscore():
|
||||
"""Test whether putting a new high score succeeds"""
|
||||
|
||||
Reference in New Issue
Block a user