示例#1
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)
示例#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 pytest.raises(ItemNotFoundError):
         submit_rescore_problem_for_student(request, problem_url, self.student)
     with pytest.raises(ItemNotFoundError):
         submit_rescore_problem_for_all_students(request, problem_url)
     with pytest.raises(ItemNotFoundError):
         submit_reset_problem_attempts_for_all_students(request, problem_url)
     with pytest.raises(ItemNotFoundError):
         submit_delete_problem_state_for_all_students(request, problem_url)
示例#3
0
 def delete_problem_state(self, instructor, location):
     """Submits the current problem for deletion"""
     return submit_delete_problem_state_for_all_students(self.create_task_request(instructor), location)
 def delete_problem_state(self, instructor, location):
     """Submits the current problem for deletion"""
     return submit_delete_problem_state_for_all_students(
         self.create_task_request(instructor), location)