示例#1
0
 def test_submit_nonrescorable_modules(self):
     # confirm that a rescore of an existent but unscorable module returns an exception
     # (Note that it is easier to test a scoreable but non-rescorable module in test_tasks,
     # where we are creating real modules.)
     problem_url = self.problem_section.location
     request = None
     with self.assertRaises(NotImplementedError):
         submit_rescore_problem_for_student(request, problem_url, self.student)
     with self.assertRaises(NotImplementedError):
         submit_rescore_problem_for_all_students(request, problem_url)
示例#2
0
 def test_submit_nonexistent_modules(self):
     # confirm that a rescore of a non-existent module returns an exception
     problem_url = InstructorTaskModuleTestCase.problem_location("NonexistentProblem")
     request = None
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_student(request, problem_url, self.student)
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_reset_problem_attempts_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_delete_problem_state_for_all_students(request, problem_url)
示例#3
0
 def test_submit_nonrescorable_modules(self):
     # confirm that a rescore of an existent but unscorable module returns an exception
     # (Note that it is easier to test a scoreable but non-rescorable module in test_tasks,
     # where we are creating real modules.)
     problem_url = self.problem_section.location
     course_id = self.course.id
     request = None
     with self.assertRaises(NotImplementedError):
         submit_rescore_problem_for_student(request, problem_url,
                                            self.student)
     with self.assertRaises(NotImplementedError):
         submit_rescore_problem_for_all_students(request, problem_url)
 def test_submit_nonexistent_modules(self):
     # confirm that a rescore of a non-existent module returns an exception
     problem_url = InstructorTaskModuleTestCase.problem_location("NonexistentProblem")
     request = None
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_student(request, problem_url, self.student)
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_reset_problem_attempts_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_delete_problem_state_for_all_students(request, problem_url)
 def submit_rescore_one_student_answer(self, instructor, problem_url_name, student):
     """Submits the particular problem for rescoring for a particular student"""
     return submit_rescore_problem_for_student(
         self.create_task_request(instructor),
         InstructorTaskModuleTestCase.problem_location(problem_url_name),
         student,
     )
示例#6
0
 def submit_rescore_one_student_answer(self, instructor, problem_url_name,
                                       student):
     """Submits the particular problem for rescoring for a particular student"""
     return submit_rescore_problem_for_student(
         self.create_task_request(instructor),
         InstructorTaskModuleTestCase.problem_location(problem_url_name),
         student)