test(8249): task kinds are proven by a listing, not by a signature
Review of the small test groups. Four tests pinned an argument list or a function existing where the behaviour was untested or tested elsewhere: - test_routes_planning: the signature check and the callable check become one check that POST /api/tasks/planning is routed on the app. - test_routes_tasks_kind: both signature checks go; create_note and list_notes are called with task_kind by tests that would fail without it, and the blueprint check is covered by the planning route check. - test_list_notes_filters_by_task_kind asserted only that the call did not raise. It is replaced by a database test that lists issues, work and all kinds and checks the rows and the count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import inspect
|
||||
"""The planning door of the tasks API is routed: POST /api/tasks/planning
|
||||
reaches a handler on the running app. What the handler does is the planning
|
||||
service's to prove (tests/test_mcp_tool_create_records.py drives it)."""
|
||||
|
||||
|
||||
def test_planning_handler_callable():
|
||||
from grimoire.routes import tasks as tasks_routes
|
||||
assert callable(tasks_routes.start_planning_route)
|
||||
|
||||
|
||||
def test_planning_service_signature():
|
||||
from grimoire.services.planning import start_planning
|
||||
params = inspect.signature(start_planning).parameters
|
||||
assert "user_id" in params and "project_id" in params and "title" in params
|
||||
def test_starting_a_plan_is_routed_on_the_app():
|
||||
from grimoire.app import create_app
|
||||
rules = {
|
||||
(str(r.rule), m) for r in create_app().url_map.iter_rules() for m in r.methods
|
||||
}
|
||||
assert ("/api/tasks/planning", "POST") in rules
|
||||
|
||||
Reference in New Issue
Block a user