Refresh web UI and make ML imports optional
All checks were successful
ci / tests (push) Successful in 21s
All checks were successful
ci / tests (push) Successful in 21s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user