Пример #1
0
 def test_update_class_as_student(self):
     self.assertFalse(
         HasClassPermission.has_permission(
             self=self.mock,
             request=self.mock_student_request,
             view=self.mock_view_update,
         ))
Пример #2
0
 def test_partial_update_class_as_school(self):
     self.assertTrue(
         HasClassPermission.has_permission(
             self=self.mock,
             request=self.mock_school_request,
             view=self.mock_view_partial_update,
         ))
Пример #3
0
 def test_delete_class_as_school(self):
     self.assertTrue(
         HasClassPermission.has_permission(
             self=self.mock,
             request=self.mock_school_request,
             view=self.mock_view_destroy,
         ))
Пример #4
0
 def test_create_class_as_teacher(self):
     self.assertTrue(
         HasClassPermission.has_permission(
             self=self.mock,
             request=self.mock_teacher_request,
             view=self.mock_view_create,
         ))
Пример #5
0
 def test_delete_class_as_teacher(self):
     self.assertFalse(
         HasClassPermission.has_permission(
             self=self.mock,
             request=self.mock_teacher_request,
             view=self.mock_view_destroy,
         ))