mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
test: lift coverage 41% → 76% (+1068 tests across 36 files)
Service-level tests now exercise provider, permissions, project, journal, messaging, work_session, metrics, kanban, extraction, learning, notification, dashboard, llm_routing, a2a, task, repository_base, audit, db_seed, branch_name, indexed_document, query_helpers, agent. API route tests cover provider, journal, project, sessions, dashboard, work_session, tasks, a2a, groups, notifications, agents, channels, messages, kanban, api_resources. Pure-function helpers covered: handlers, deps_helpers, middleware, middleware_docs, transcription, pr templates, agents_config, errors, logging, journal/notification/channel/a2a access, task_lifecycle, streaming, converters, crypto, schemas (common + websocket), events, permissions extras. pyproject ruff per-file-ignores extended for tests so PLR2004 (status code magic values), PLC0415 (lazy imports), PLR0913 (fixture params), ARG001 (unused fixture deps), SIM105, and E501 don't fight test idioms.
This commit is contained in:
@@ -12,7 +12,7 @@ from httpx import ASGITransport, AsyncClient
|
||||
from roboco.api.deps import get_agent_context, get_db
|
||||
from roboco.api.routes.channels import router as channels_router
|
||||
from roboco.db.tables import AgentTable, ChannelTable
|
||||
from roboco.models import AgentRole, AgentStatus, Team
|
||||
from roboco.models import AgentRole, AgentStatus
|
||||
from roboco.models.base import ChannelType
|
||||
from roboco.models.permissions import AgentContext
|
||||
|
||||
@@ -82,9 +82,7 @@ async def test_list_channels(channels_client: dict) -> None:
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_channel_unknown(channels_client: dict) -> None:
|
||||
client = channels_client["client"]
|
||||
response = await client.get(
|
||||
f"/api/channels/{uuid4()}", headers=_HDR
|
||||
)
|
||||
response = await client.get(f"/api/channels/{uuid4()}", headers=_HDR)
|
||||
assert response.status_code == 404
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user