fix: allow dev guest to switch to authenticated account
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
APP = (ROOT / "app" / "web_app_fastapi.py").read_text(encoding="utf-8")
|
||||
HEADER = (ROOT / "app" / "templates" / "header.html").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_dev_guest_is_allowed_to_open_login_page():
|
||||
assert 'current_user.get("role") != "dev_guest"' in APP
|
||||
|
||||
|
||||
def test_dev_guest_header_offers_real_login_instead_of_logout():
|
||||
assert "user_info.role == 'dev_guest'" in HEADER
|
||||
assert "url_for('login')" in HEADER
|
||||
Reference in New Issue
Block a user