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, ))
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, ))
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, ))
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, ))
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, ))