quiz-the-word/tests/test_admin.py
Matthew Welch a69c85c588 Add initial tests for the admin site
Tests that the admin site requires a user with the admin role
2021-03-28 17:33:59 -07:00

12 lines
346 B
Python

from flask.testing import FlaskClient
def test_admin_home_with_basic_user(client: FlaskClient, login_basic_user):
response = client.get("/admin/")
assert response.status_code == 403
def test_admin_home_with_admin_user(client: FlaskClient, login_admin_user):
response = client.get("/admin/")
assert response.status_code == 200