Spaces:
Runtime error
Runtime error
Download tests/test_server.py from build-small-hackathon/secret-student: direct link, hf CLI and curl.
- Browser
- Download file 685 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/secret-student/resolve/main/tests/test_server.py
- Command line
-
hf download hf://spaces/build-small-hackathon/secret-student/tests/test_server.py
-
curl -L -o test_server.py https://huggingface.co/spaces/build-small-hackathon/secret-student/resolve/main/tests/test_server.py
685 Bytes
| from fastapi.testclient import TestClient | |
| from app.server import app | |
| def test_game_routes_force_browser_cache_revalidation(): | |
| with TestClient(app) as client: | |
| game = client.get("/game") | |
| world = client.get("/game-static/src/world.js") | |
| assert game.status_code == 200 | |
| assert game.headers["cache-control"] == "no-store" | |
| assert world.status_code == 200 | |
| assert world.headers["cache-control"] == "no-cache, max-age=0, must-revalidate" | |
| def test_gradio_shell_versions_the_embedded_game_url(): | |
| with TestClient(app) as client: | |
| response = client.get("/") | |
| assert response.status_code == 200 | |
| assert "/game?v=20260615-2" in response.text | |