From d439fd80ef55f5b4b74d0a21d6f02d21acc8db7f Mon Sep 17 00:00:00 2001 From: Mariusz Banach Date: Wed, 18 Feb 2026 01:13:47 +0100 Subject: [PATCH] MAESTRO: fix async tests router validation --- .../SpecKit-web-header-analyzer-Phase-04-Test-Selection.md | 2 +- backend/app/routers/tests.py | 2 +- backend/tests/api/test_tests_router.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Auto Run Docs/SpecKit-web-header-analyzer-Phase-04-Test-Selection.md b/Auto Run Docs/SpecKit-web-header-analyzer-Phase-04-Test-Selection.md index 8149c6a..a481664 100644 --- a/Auto Run Docs/SpecKit-web-header-analyzer-Phase-04-Test-Selection.md +++ b/Auto Run Docs/SpecKit-web-header-analyzer-Phase-04-Test-Selection.md @@ -28,7 +28,7 @@ This phase implements the test selection panel and analysis configuration contro ## Completion -- [ ] `pytest backend/tests/api/test_tests_router.py` passes +- [x] `pytest backend/tests/api/test_tests_router.py` passes - [ ] `GET /api/tests` returns all 106+ tests with id, name, and category - [x] All vitest tests pass: `npx vitest run src/__tests__/TestSelector.test.tsx src/__tests__/AnalysisControls.test.tsx` - [ ] Test selector renders all 106+ tests with checkboxes diff --git a/backend/app/routers/tests.py b/backend/app/routers/tests.py index cee004e..c84e3fa 100644 --- a/backend/app/routers/tests.py +++ b/backend/app/routers/tests.py @@ -12,4 +12,4 @@ router = APIRouter(prefix="/api", tags=["tests"]) def list_tests() -> list[TestResponse]: registry = ScannerRegistry() tests = registry.list_tests() - return [TestResponse.model_validate(test) for test in tests] + return [TestResponse.model_validate(test.model_dump()) for test in tests] diff --git a/backend/tests/api/test_tests_router.py b/backend/tests/api/test_tests_router.py index de7d9de..dfa1291 100644 --- a/backend/tests/api/test_tests_router.py +++ b/backend/tests/api/test_tests_router.py @@ -7,7 +7,7 @@ from app.engine.scanner_registry import ScannerRegistry from app.main import app -@pytest.mark.asyncio +@pytest.mark.anyio async def test_get_tests_returns_all_registered_tests() -> None: registry = ScannerRegistry() expected = registry.list_tests()