feat: add standards wiki, MCP registry, and app template
This commit is contained in:
0
templates/app/tests/integration/__init__.py
Normal file
0
templates/app/tests/integration/__init__.py
Normal file
21
templates/app/tests/integration/test_item_routes.py
Normal file
21
templates/app/tests/integration/test_item_routes.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import importlib
|
||||
|
||||
import interfaces.openapi as routes_module
|
||||
|
||||
from openapi_first.app import OpenAPIFirstApp
|
||||
|
||||
|
||||
def test_openapi_app_builds():
|
||||
"""The spec-first app must build and plant each route handler."""
|
||||
module = importlib.import_module(routes_module.__name__)
|
||||
for operation in ("create_item", "get_item", "list_items", "delete_item",
|
||||
"create_job", "get_job", "list_jobs"):
|
||||
assert hasattr(module, operation)
|
||||
|
||||
app = OpenAPIFirstApp(
|
||||
openapi_path="openapi.yaml",
|
||||
routes_module=module,
|
||||
title="Item API",
|
||||
version="0.1.0",
|
||||
)
|
||||
assert app is not None
|
||||
Reference in New Issue
Block a user