forked from retoor/devplacepy
chore: reorganize test files into domain-specific subdirectories under tests/
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.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
|
||||
import requests
|
||||
from tests.conftest import BASE_URL
|
||||
|
||||
|
||||
def test_proxy_unknown_slug_returns_404(app_server):
|
||||
r = requests.get(f"{BASE_URL}/p/nonexistent-slug", allow_redirects=False)
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
def test_proxy_unknown_slug_json(app_server):
|
||||
r = requests.get(
|
||||
f"{BASE_URL}/p/nonexistent-slug",
|
||||
headers={"X-Requested-With": "fetch"},
|
||||
allow_redirects=False,
|
||||
)
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
def test_proxy_unknown_slug_with_path(app_server):
|
||||
r = requests.get(
|
||||
f"{BASE_URL}/p/nonexistent-slug/some/path", allow_redirects=False
|
||||
)
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
def test_proxy_post_unknown_slug(app_server):
|
||||
r = requests.post(f"{BASE_URL}/p/nonexistent-slug", allow_redirects=False)
|
||||
assert r.status_code == 404
|
||||
Reference in New Issue
Block a user