(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
| 11 | |
| 12 | @pytest.fixture() |
| 13 | def client(tmp_path: Path, monkeypatch: pytest.MonkeyPatch): |
| 14 | monkeypatch.setenv("MAPGAME_DB", str(tmp_path / "test.sqlite")) |
| 15 | monkeypatch.setenv("MAPGAME_ALLOW_MANUAL_UNLOCK", "1") |
| 16 | from backend.app.db import init_db |
| 17 | from backend.app.main import app |
| 18 | |
| 19 | init_db() |
| 20 | with TestClient(app) as test_client: |
| 21 | yield test_client |
| 22 | |
| 23 | |
| 24 | def test_challenge_lifecycle(client: TestClient) -> None: |