Files
pdf/gateway/tests/test_placeholders.py
T

30 lines
1008 B
Python

"""Every PDF-touching route returns 501 until the engine bridge exists.
When Gate G0b lands and `bindings/python/` is wired up, these tests will
fail loudly — that is the cue to replace them with real route tests.
"""
import pytest
from fastapi.testclient import TestClient
@pytest.mark.parametrize(
("method", "path"),
[
("POST", "/documents"),
("GET", "/documents"),
("GET", "/documents/abc"),
("DELETE", "/documents/abc"),
("GET", "/documents/abc/pages/0/render"),
("GET", "/documents/abc/pages/0/text"),
("POST", "/documents/abc/edits"),
],
)
def test_placeholder_routes_return_501(client: TestClient, method: str, path: str) -> None:
response = client.request(method, path)
assert response.status_code == 501, (
f"{method} {path} returned {response.status_code}; "
"Phase 0 placeholder routes must 501 until the engine bridge exists."
)
assert "engine bridge" in response.json()["detail"].lower()