test: 7 agents — plugins ~158 tests, extractor 98-100%, dashboard routes 99-100%, git services 94-100%, services 94-100%, dataset_review 100%. Fix test_api_key_routes.py sys.modules pollution

This commit is contained in:
2026-06-15 18:30:05 +03:00
parent 0b7512ac43
commit c2f7a73e68
40 changed files with 9629 additions and 4 deletions

View File

@@ -14,9 +14,9 @@ from unittest.mock import MagicMock
from fastapi.testclient import TestClient
# Patch GitService at module level to prevent /app/storage/repositories error
# Only patch git_service (5-line shim), NOT git._base (233 lines — breaks other tests)
_mock_git_svc_cls = MagicMock()
_mock_git_svc_cls.return_value = MagicMock()
sys.modules['src.services.git._base'] = MagicMock(GitService=_mock_git_svc_cls)
sys.modules['src.services.git_service'] = MagicMock(GitService=_mock_git_svc_cls)