예제 #1
0
 def test_student_passes_test(self):
     request = self.factory.get("/courses/s")
     request.user = User.objects.create(is_teacher=False)
     response = student_page(request)
     self.assertEqual(response.status_code, 200)
예제 #2
0
 def test_student_page_correct_template(self):
     request = HttpRequest()
     request.user = User.objects.create(is_teacher=False)
     response_student_page = student_page(request)
     self.assertTemplateUsed("student_page.html")