Live mode with resolve-before-next call flow and one-tap outcomes (assessments, missing, skip); printable numbered call lists with pictures and a blank notes column; a day editor for after-class outcome entry, replacing hand-editing of call_list TSVs; and a per-course settings page (selection mode, weight factor, assessment visibility). Selection honors opt-outs and the course's mode: weighted draws use full-course answered-call history, cycle mode calls everyone once per day before starting over and treats skips as never called. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
from conftest import make_app
|
|
|
|
|
|
def test_healthz(tmp_path):
|
|
client = make_app(tmp_path, dev_mode=False).test_client()
|
|
assert client.get("/healthz").json == {"status": "ok"}
|
|
|
|
|
|
def test_dev_routes_absent_outside_dev_mode(tmp_path):
|
|
client = make_app(tmp_path, dev_mode=False).test_client()
|
|
assert client.get("/dev/").status_code == 404
|
|
|
|
|
|
def test_views_require_launch(dev_client):
|
|
assert dev_client.get("/instructor/").status_code == 403
|
|
assert dev_client.get("/me").status_code == 403
|
|
|
|
|
|
def test_dev_instructor_launch_shows_roster(dev_client):
|
|
assert dev_client.get("/dev/").status_code == 200
|
|
resp = dev_client.post(
|
|
"/dev/launch/dev-instructor", follow_redirects=True
|
|
)
|
|
assert resp.status_code == 200
|
|
page = resp.get_data(as_text=True)
|
|
assert "8 active students" in page
|
|
|
|
|
|
def test_dev_student_launch(dev_client):
|
|
resp = dev_client.post(
|
|
"/dev/launch/dev-student-1", follow_redirects=True
|
|
)
|
|
page = resp.get_data(as_text=True)
|
|
assert "Ada Lovelace" in page
|
|
# A student cannot reach the instructor views.
|
|
assert dev_client.get("/instructor/").status_code == 403
|
|
assert dev_client.get("/instructor/live").status_code == 403
|