Split the monolithic test directory into three tiers (unit, api, e2e) with a path-mirroring directory structure. Added corresponding Makefile targets (test-unit, test-api, test-e2e) and updated all documentation references (CLAUDE.md, README.md, testing-cicd.html, testing-framework.html, testing-make.html) to reflect the new layout and naming conventions.
20 lines
541 B
Python
20 lines
541 B
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
from tests.conftest import BASE_URL
|
|
|
|
|
|
def test_devii_adopt_redirects(page, app_server):
|
|
resp = page.request.get(
|
|
f"{BASE_URL}/devii/adopt?next=/feed", max_redirects=0
|
|
)
|
|
assert resp.status == 303
|
|
assert resp.headers.get("location") == "/feed"
|
|
|
|
|
|
def test_devii_adopt_rejects_external(page, app_server):
|
|
resp = page.request.get(
|
|
f"{BASE_URL}/devii/adopt?next=https://evil.com", max_redirects=0
|
|
)
|
|
assert resp.status == 303
|
|
assert resp.headers.get("location") == "/"
|