Commit Graph

2 Commits

Author SHA1 Message Date
Luca Sacchi Ricciardi
a5029aef20 test: add comprehensive tests for NotebookLM-RAG integration
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / lint (push) Has been cancelled
Add test coverage for new integration components:

New Test Files:
- test_notebooklm_indexer.py: Unit tests for NotebookLMIndexerService
  * test_sync_notebook_success: Verify successful notebook sync
  * test_sync_notebook_not_found: Handle non-existent notebooks
  * test_extract_source_content_success/failure: Content extraction
  * test_delete_notebook_index_success/failure: Index management
  * test_end_to_end_sync_flow: Integration verification

- test_notebooklm_sync.py: API route tests
  * test_sync_notebook_endpoint: POST /notebooklm/sync/{id}
  * test_list_indexed_notebooks_endpoint: GET /notebooklm/indexed
  * test_delete_notebook_index_endpoint: DELETE /notebooklm/sync/{id}
  * test_get_sync_status_endpoint: GET /notebooklm/sync/{id}/status
  * test_query_with_notebook_ids: Query with notebook filters
  * test_query_notebooks_endpoint: POST /query/notebooks

All tests use mocking to avoid external dependencies.
2026-04-06 17:21:06 +02:00
Luca Sacchi Ricciardi
f6638d5406 test(agentic-rag): add comprehensive unit tests for core, services, and API
## Added
- conftest.py: Shared fixtures and mocks
- test_core/test_config.py: 35 tests for Settings
- test_core/test_logging.py: 15 tests for logging
- test_api/test_chat.py: 27 tests for chat endpoints
- test_api/test_health.py: 27 tests for health endpoints
- test_services/test_document_service.py: 38 tests
- test_services/test_rag_service.py: 66 tests
- test_services/test_vector_store.py: 32 tests

## Coverage
- auth.py: 100%
- config.py: 100%
- logging.py: 100%
- chat.py: 100%
- health.py: 100%
- document_service.py: 96%
- rag_service.py: 100%
- vector_store.py: 100%

Total: 240 tests passing, 64% coverage

🧪 Core functionality fully tested
2026-04-06 13:11:09 +02:00