Files
devplacepy/tests/api/sync/spec.py
T
retoor 6f80a820da
DevPlace CI / test (push) Failing after 3m13s
Zo doen wijdat in oost
2026-10-16 07:20:44 +02:00

16 lines
597 B
Python

# retoor <retoor@molodetz.nl>
from devplacepy.services.sync.spec import SPEC
def test_spec_is_public_and_matches_code(client):
response = client.get("/sync/spec.json")
assert response.status_code == 200
body = response.json()
assert body["kinds"] == list(SPEC.kinds)
assert body["statuses"] == list(SPEC.statuses)
assert body["limits"]["max_batch_records"] == SPEC.limits.max_batch_records
assert set(body["records"]) == set(SPEC.kinds)
assert "username" in body["records"]["users"]["properties"]
assert "stars" not in body["records"]["posts"]["properties"]