Member invites, gallery resync, content and operator docs
- Invite flow: admin issue/revoke on join requests, public single-use claim links (hash-only tokens, 7-day expiry, no state reveal), claim creates the Member account and marks the request accepted - Gallery: admin status page plus resync endpoint; sync refreshes thumbnails whose content changed; tools/gallery contract and checker - Docs: public content page, admin-only operator runbook, api.md invite/gallery sections, all routes in the live API docs, docs reachability gate test - Screenshots cover the new pages; version 1.0.18
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
import pytest
|
||||
|
||||
from molodetz.docs_prose import DOCS_PAGES, PROSE_DIR, page_source, render_page
|
||||
|
||||
|
||||
def test_every_docs_page_has_source_and_renders():
|
||||
for page in DOCS_PAGES:
|
||||
assert (PROSE_DIR / page["file"]).is_file(), page["slug"]
|
||||
assert page_source(page["slug"]).strip(), page["slug"]
|
||||
assert render_page(page["slug"]).strip(), page["slug"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("page", DOCS_PAGES, ids=lambda page: page["slug"])
|
||||
def test_docs_page_reachability_matches_gate(page, anon, admin):
|
||||
response = admin.get(f"/docs/{page['slug']}")
|
||||
assert response.status_code == 200, page["slug"]
|
||||
assert page["title"] in response.text
|
||||
anon_response = anon.get(f"/docs/{page['slug']}")
|
||||
if page.get("admin"):
|
||||
assert anon_response.status_code == 404, page["slug"]
|
||||
else:
|
||||
assert anon_response.status_code == 200, page["slug"]
|
||||
Reference in New Issue
Block a user