Refresh web UI and make ML imports optional
All checks were successful
ci / tests (push) Successful in 21s

This commit is contained in:
dan
2025-12-25 09:15:10 +03:00
parent f542747d5e
commit 2499deb071
49 changed files with 4367 additions and 500 deletions

View File

@@ -52,19 +52,20 @@ def test_api_game_flow() -> None:
token = response.json()["token"]
headers = {"Authorization": f"Bearer {token}"}
response = client.post("/api/games", json={"name": "Arena", "max_players": 2}, headers=headers)
response = client.post("/api/games", json={"name": "Arena", "max_players": 3}, headers=headers)
assert response.status_code == 200
game_id = response.json()["id"]
response = client.post(f"/api/games/{game_id}/join", headers=headers)
assert response.status_code == 200
response = client.post(
f"/api/games/{game_id}/add-ai",
json={"ai_type": "random"},
headers=headers,
)
assert response.status_code == 200
for _ in range(2):
response = client.post(
f"/api/games/{game_id}/add-ai",
json={"ai_type": "random"},
headers=headers,
)
assert response.status_code == 200
response = client.post(f"/api/games/{game_id}/start", headers=headers)
assert response.status_code == 200