Mirror test layout, domcontentloaded waits, backup DB writes outside threads

This commit is contained in:
2026-10-05 09:41:22 +02:00
parent 8f6c5be314
commit 622795c9a0
46 changed files with 296 additions and 241 deletions
+20
View File
@@ -0,0 +1,20 @@
# retoor <retoor@molodetz.nl>
from molodetz.docs_api import all_endpoints
from molodetz.docs_api.registry import TARGET_TYPES
def test_documented_endpoints_are_unique():
keys = [(item["method"], item["path"]) for item in all_endpoints()]
assert len(keys) == len(set(keys))
def test_documented_endpoints_exist_in_app():
from molodetz.main import app
routes = {(method.upper(), path) for path, methods in app.openapi()["paths"].items() for method in methods}
missing = [(item["method"], item["path"]) for item in all_endpoints() if (item["method"], item["path"]) not in routes]
assert missing == []
def test_target_types_known():
assert set(TARGET_TYPES) == {"post", "join_request", "user"}