test: migrate src.models bare imports + PROVIDERS/Metadata sub-imports to direct subsystems

Removed 18 unused 'from src import models' imports. Migrated the
explicit sub-imports:
- 'from src.models import PROVIDERS' -> 'from src.ai_client import PROVIDERS'
  (test_minimax_provider x2, test_deepseek_infra)
- 'from src.models import Metadata' -> 'from src.type_aliases import Metadata'
  (test_project_manager_tracks, test_track_state_persistence, test_track_state_schema)

Kept the 2 'import src.models as models' in test_provider_curation +
test_providers_source_of_truth (they verify the backward-compat shim
still re-exports PROVIDERS) and the 2 self-tests
(test_models_no_top_level_pydantic + test_models_no_top_level_tomli_w)
that exercise the shim's no-leak invariants.
This commit is contained in:
ed
2026-07-05 20:12:17 -04:00
parent bd6fc3e259
commit 6a3c142bfa
21 changed files with 56 additions and 27 deletions
+1 -2
View File
@@ -7,7 +7,6 @@ import pytest
from src.app_controller import AppController
from src import ai_client
from src import events
from src import models
from src.mcp_client import VectorStoreConfig, RAGConfig
from src.result_types import Result
@@ -113,4 +112,4 @@ def test_rag_integration(mock_project):
assert "Source: test_file.py" in sent_user_message
# Verify that rag_engine.search was called with the original prompt
mock_rag_engine.search.assert_called_once_with("Tell me about the code.")
mock_rag_engine.search.assert_called_once_with("Tell me about the code.")