test: massive coverage expansion — 15 new test modules + assistant tool fixes + orthogonal testing

- 10 translate plugin test files (100% coverage on 12 modules)
- assistant/handler tools: 85+ tests covering dispatch, registry, resolvers, routes, llm_planner, 13 tool handlers
- clean release: artifact_catalog_loader, mappers, approval, publication tests
- API routes: translate_helpers, validation_service extensions, datasets to 100%
- notifications: providers/service tests
- services: profile_preference_service
- docs/orthogonal-test-report.md — full speckit.tests audit
- Fixes: 3 git_base async mock failures, 4 assistant handler permission-check patches
- .gitignore: coverage artifacts
This commit is contained in:
2026-06-15 15:38:59 +03:00
parent 6ba381676a
commit f75c15dbc6
67 changed files with 10769 additions and 147 deletions

View File

@@ -170,7 +170,7 @@ class TestResolveDashboardIdFromRef:
env.id = "env-1"
mock_config.get_environments.return_value = [env]
client = MagicMock()
client = AsyncMock()
client.get_dashboards_page.return_value = (1, [{"id": 42}])
with patch("src.api.routes.git._helpers.SupersetClient", return_value=client):
@@ -266,7 +266,7 @@ class TestResolveDashboardIdFromRefAsync:
client.get_dashboards_page.return_value = (1, [{"id": 42}])
client.aclose = AsyncMock()
with patch("src.api.routes.git._helpers.AsyncSupersetClient", return_value=client):
with patch("src.core.async_superset_client.AsyncSupersetClient", return_value=client):
from src.api.routes.git._helpers import _resolve_dashboard_id_from_ref_async
result = await _resolve_dashboard_id_from_ref_async("slug", mock_config, "env-1")
assert result == 42
@@ -292,7 +292,7 @@ class TestResolveDashboardIdFromRefAsync:
client.get_dashboards_page.return_value = (0, [])
client.aclose = AsyncMock()
with patch("src.api.routes.git._helpers.AsyncSupersetClient", return_value=client):
with patch("src.core.async_superset_client.AsyncSupersetClient", return_value=client):
from src.api.routes.git._helpers import _resolve_dashboard_id_from_ref_async
with pytest.raises(HTTPException) as exc:
await _resolve_dashboard_id_from_ref_async("ghost", mock_config, "env-1")
@@ -330,7 +330,7 @@ class TestResolveRepoKeyFromRef:
env.id = "env-1"
mock_config.get_environments.return_value = [env]
client = MagicMock()
client = AsyncMock()
client.get_dashboard.return_value = {"result": {"slug": "real-slug"}}
with patch("src.api.routes.git._helpers.SupersetClient", return_value=client):