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,22 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
|
||||
from tests.conftest import BASE_URL
|
||||
|
||||
|
||||
def test_devii_session_as_guest(page, app_server):
|
||||
resp = page.request.get(f"{BASE_URL}/devii/session")
|
||||
data = resp.json()
|
||||
assert data["loggedIn"] is False
|
||||
assert data["username"] == "guest"
|
||||
assert "enabled" in data
|
||||
assert "guestsEnabled" in data
|
||||
assert data["baseUrl"] == BASE_URL
|
||||
|
||||
|
||||
def test_devii_session_as_logged_in(alice):
|
||||
page, _ = alice
|
||||
resp = page.request.get(f"{BASE_URL}/devii/session")
|
||||
data = resp.json()
|
||||
assert data["loggedIn"] is True
|
||||
assert data["username"] == "alice_test"
|
||||
assert "enabled" in data
|
||||
Reference in New Issue
Block a user