mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-02-22 05:23:31 +01:00
MAESTRO: fix async tests router validation
This commit is contained in:
@@ -28,7 +28,7 @@ This phase implements the test selection panel and analysis configuration contro
|
|||||||
|
|
||||||
## Completion
|
## 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
|
- [ ] `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`
|
- [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
|
- [ ] Test selector renders all 106+ tests with checkboxes
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ router = APIRouter(prefix="/api", tags=["tests"])
|
|||||||
def list_tests() -> list[TestResponse]:
|
def list_tests() -> list[TestResponse]:
|
||||||
registry = ScannerRegistry()
|
registry = ScannerRegistry()
|
||||||
tests = registry.list_tests()
|
tests = registry.list_tests()
|
||||||
return [TestResponse.model_validate(test) for test in tests]
|
return [TestResponse.model_validate(test.model_dump()) for test in tests]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from app.engine.scanner_registry import ScannerRegistry
|
|||||||
from app.main import app
|
from app.main import app
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.anyio
|
||||||
async def test_get_tests_returns_all_registered_tests() -> None:
|
async def test_get_tests_returns_all_registered_tests() -> None:
|
||||||
registry = ScannerRegistry()
|
registry = ScannerRegistry()
|
||||||
expected = registry.list_tests()
|
expected = registry.list_tests()
|
||||||
|
|||||||
Reference in New Issue
Block a user