'Retrieves the subsection grade and verifies that
its scores match those expected.'

def _get_subsection_grade_and_verify(self, all_earned, all_possible, graded_earned, graded_possible):

    subsection_grade_factory = SubsectionGradeFactory(self.user, self.course, get_course_blocks(self.user, self.course.location))
    grade = subsection_grade_factory.create(self.sequence)
    self.assertEqual(grade.all_total.earned, all_earned)
    self.assertEqual(grade.graded_total.earned, graded_earned)
    self.assertEqual(grade.all_total.possible, all_possible)
    self.assertEqual(grade.graded_total.possible, graded_possible)
