legco_ai_assistant/backend/app
Woody 2656f9ca08 refactor(test): rewrite tests to comply with integration-first rules
Replace mocked DB/internal-services with real ChromaDB/SQLite via tmp_path.
Only mock truly external APIs (LLM, embedding for deterministic vectors).

13 test files rewritten (314 pass, 0 fail):
- Route tests: use TestClient + real ChromaDB, seed test data
- Service tests: use real PersistentClient/SQLite instances
- Pipeline tests: TestClient hits SSE /query endpoint, verify history
- Converted unittest.TestCase to pytest where applicable

Plus: fix metadata.py to filter None values from ChromaDB metadata
(pre-existing bug caught by real-DB ingestion tests)
2026-04-27 11:46:58 +08:00
..
core feat(prompts): integrate filter_per_subq with PromptService, fix seed bugs, restructure UI 2026-04-27 11:14:27 +08:00
models feat(models): add SubQuestionSources model and per-sub-q history fields 2026-04-26 23:28:19 +08:00
routers feat(prompts): integrate filter_per_subq with PromptService, fix seed bugs, restructure UI 2026-04-27 11:14:27 +08:00
services feat(prompts): integrate filter_per_subq with PromptService, fix seed bugs, restructure UI 2026-04-27 11:14:27 +08:00
test refactor(test): rewrite tests to comply with integration-first rules 2026-04-27 11:46:58 +08:00
utils refactor(test): rewrite tests to comply with integration-first rules 2026-04-27 11:46:58 +08:00
__init__.py feat: Phase 1.1 project setup with config, database, and models 2026-04-22 16:13:52 +08:00
main.py feat(history): Phase 3.5 — Query History backend (service, API, timing, XML capture) 2026-04-25 22:59:53 +08:00