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.
15 lines
451 B
Python
15 lines
451 B
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
from playwright.sync_api import expect
|
|
from tests.conftest import BASE_URL
|
|
|
|
|
|
def test_profile_regenerate_api_key(alice):
|
|
page, user = alice
|
|
page.goto(f"{BASE_URL}/profile/{user['username']}", wait_until="domcontentloaded")
|
|
resp = page.request.post(f"{BASE_URL}/profile/regenerate-api-key")
|
|
assert resp.status == 200
|
|
data = resp.json()
|
|
assert "api_key" in data
|
|
assert len(data["api_key"]) > 0
|