First product
This commit is contained in:
parent
778da9e2fc
commit
4433d7d2c4
157 changed files with 23975 additions and 0 deletions
20
tests/unit/test_phase2_pages.py
Normal file
20
tests/unit/test_phase2_pages.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.main import app
|
||||
|
||||
|
||||
def test_phase2_pages_redirect_to_login_when_unauthenticated() -> None:
|
||||
client = TestClient(app)
|
||||
|
||||
for path in (
|
||||
"/users",
|
||||
"/runs",
|
||||
"/runs/1",
|
||||
"/publications",
|
||||
"/scholars",
|
||||
"/settings",
|
||||
"/account/password",
|
||||
):
|
||||
response = client.get(path, follow_redirects=False)
|
||||
assert response.status_code == 303
|
||||
assert response.headers["location"] == "/login"
|
||||
Loading…
Add table
Add a link
Reference in a new issue