← Files AgentBrokoARCHIVED FILE
tests/test_api.py
767 Bytes · Sep 30, 2026 · 23:15 UTC
import json
from api.index import handle_api_route
def test_chatgpt_openapi_contract():
status, content_type, body = handle_api_route("/openapi.json")
document = json.loads(body)
assert status == 200
assert content_type == "application/json"
assert document["openapi"] == "3.0.3"
assert "/api/generate/video" in document["paths"]
assert document["paths"]["/api/generate/video"]["post"]["operationId"] == "generateVideoProject"
def test_legacy_chatgpt_plugin_manifest():
status, _, body = handle_api_route("/.well-known/ai-plugin.json")
manifest = json.loads(body)
assert status == 200
assert manifest["name_for_model"] == "agentbroko"
assert manifest["api"]["url"].endswith("/openapi.json")SHA-256: a0669857e0d835b55c4cb7e2be0ef44cd6d99a4d847f04c69433f1d908d2eb99