'Test delete student state.'

@mock.patch('lms.djangoapps.grades.signals.handlers.PROBLEM_WEIGHTED_SCORE_CHANGED.send')
def test_reset_student_attempts_delete(self, _mock_signal):

    self.assertEqual(StudentModule.objects.filter(student=self.module_to_reset.student, course_id=self.course.id, module_state_key=self.module_to_reset.module_state_key).count(), 1)
    self.service.delete_student_attempt(self.student.username, unicode(self.course.id), self.problem_urlname, requesting_user=self.student)
    self.assertEqual(StudentModule.objects.filter(student=self.module_to_reset.student, course_id=self.course.id, module_state_key=self.module_to_reset.module_state_key).count(), 0)
