def test_verify_teacher__teacher_doesnt_exist(client, rf): req = rf.get("/test") resp = verify_teacher(req, "validation") assert resp.status_code == 403 assert resp.template_name == "403.html"
def test_verify_teacher(client, rf, teacher): req = rf.get("/test") req.user = teacher.user resp = verify_teacher(req, "validation") assert isinstance(resp, Quality)
def test_verify_teacher__use_type_doesnt_exist(client, rf, teacher): req = rf.get("/test") req.user = teacher.user resp = verify_teacher(req, "fake") assert resp.status_code == 400 assert resp.template_name == "400.html"