Files
FabledGrimoire/tests/test_routes_platforms.py
T
bvandeusenandClaude Opus 5.5 2a4d73176e test(8249): signature and source-text batch, the hook tests run the hook
- The caller-scoping property now covers services/family, family_adoption and
  platforms, with the seven reads that need no caller named and why. The
  hand-written platform list goes.
- The snippet location keys: one test checks every door (service, MCP tool,
  web route) takes them; the route-only copy goes.
- The write-path hook: the payload-shape and skip-list tests searched the
  shell script for strings. They now run the hook against a local listener and
  check what it sends: the code from each of the four payload field names, and
  nothing for a note, JSON or SVG while a YAML file and a .py are still asked about.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 07:10:02 -05:00

19 lines
814 B
Python

"""Structural tests for the platforms blueprint: every endpoint is routed.
That each service takes its caller is in tests/test_service_user_id_contract.py,
and what the writes do is in tests/test_integration_platforms.py."""
def test_platforms_blueprint_registered_in_app():
from grimoire.app import create_app
app = create_app()
assert "platforms" in app.blueprints
rules = {(r.rule, m) for r in app.url_map.iter_rules() for m in r.methods}
for rule, method in (
("/api/platforms", "GET"),
("/api/platforms", "POST"),
("/api/platforms/<int:platform_id>", "PATCH"),
("/api/projects/<int:project_id>/platforms", "GET"),
("/api/projects/<int:project_id>/platforms", "PUT"),
):
assert (rule, method) in rules, f"{method} {rule} is not routed"