forked from retoor/devplacepy
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
500 B
Python
20 lines
500 B
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
from tests.conftest import BASE_URL
|
|
|
|
|
|
def test_devii_usage_as_guest(page, app_server):
|
|
resp = page.request.get(f"{BASE_URL}/devii/usage")
|
|
data = resp.json()
|
|
assert "used_pct" in data
|
|
assert "turns_today" in data
|
|
assert data["turns_today"] == 0
|
|
|
|
|
|
def test_devii_usage_as_logged_in(alice):
|
|
page, _ = alice
|
|
resp = page.request.get(f"{BASE_URL}/devii/usage")
|
|
data = resp.json()
|
|
assert "used_pct" in data
|
|
assert "turns_today" in data
|