Skip to content
Snippets Groups Projects

Resolve "Make exam a many to many field on StudentInfo model"

Compare and Show latest version
3 files
+ 40
9
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -126,10 +126,8 @@ class AccessRightsOfStudentReviewerAPIViewTest(APITestCase):
class AccessRightsOfExamTypeAPIViewTest(APITestCase):
""" Tests who can access the exam list. The rational here is, that this
list contains information about what number of points was necessary to pass
the exam. There is no reason why anyone should see this information except
for their own module. """
""" In older versions students had no access rights, but since multiple exams can now be
imported and the examselection page is necessary, everyone needs access."""
@classmethod
def setUpTestData(cls):
@@ -148,10 +146,10 @@ class AccessRightsOfExamTypeAPIViewTest(APITestCase):
self.request = self.factory.get(reverse('examtype-list'))
self.view = ExamApiViewSet.as_view({'get': 'list'})
def test_student_has_no_access(self):
def test_student_has_access(self):
force_authenticate(self.request, user=self.student)
response = self.view(self.request)
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.assertEqual(response.status_code, status.HTTP_200_OK)
# TODO see issue #90 for details
# def test_tutor_has_no_access(self):
Loading