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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user