test: +12 test modules — clean_release routes, gitea routes, dashboard detail, candidate_service, compliance_orchestrator, clarification_engine/orchestrator, dataset_review helpers. Fix 18 failures (assistant tools, maintence, dataset_review, approval, publication)

This commit is contained in:
2026-06-15 16:26:42 +03:00
parent fc7e6c3c15
commit a20879fa37
18 changed files with 3933 additions and 48 deletions

View File

@@ -36,6 +36,11 @@ def _make_maintenance_event(event_id="evt-1", status="ACTIVE", tables=None, envi
class TestHandleListMaintenanceEvents:
"""handle_list_maintenance_events — listing events."""
@pytest.fixture(autouse=True)
def _patch_permissions(self):
with patch("src.api.routes.assistant._tool_maintenance._check_any_permission", return_value=None):
yield
@pytest.fixture
def intent(self):
return {"entities": {}}
@@ -122,6 +127,11 @@ class TestHandleListMaintenanceEvents:
class TestHandleStartMaintenance:
"""handle_start_maintenance — starting maintenance events."""
@pytest.fixture(autouse=True)
def _patch_permissions(self):
with patch("src.api.routes.assistant._tool_maintenance._check_any_permission", return_value=None):
yield
@pytest.fixture
def intent(self):
return {"entities": {}}
@@ -292,6 +302,11 @@ class TestHandleStartMaintenance:
class TestHandleEndMaintenance:
"""handle_end_maintenance — ending maintenance events."""
@pytest.fixture(autouse=True)
def _patch_permissions(self):
with patch("src.api.routes.assistant._tool_maintenance._check_any_permission", return_value=None):
yield
@pytest.fixture
def intent(self):
return {"entities": {}}