"""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/", "PATCH"), ("/api/projects//platforms", "GET"), ("/api/projects//platforms", "PUT"), ): assert (rule, method) in rules, f"{method} {rule} is not routed"