コード例 #1
0
ファイル: test_enrollment.py プロジェクト: gopinath81/vmss
 def _get_subsection_grade_and_verify(self, all_earned, all_possible,
                                      graded_earned, graded_possible):
     """
     Retrieves the subsection grade and verifies that
     its scores match those expected.
     """
     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)
コード例 #2
0
 def _get_subsection_grade_and_verify(self, all_earned, all_possible, graded_earned, graded_possible):
     """
     Retrieves the subsection grade and verifies that
     its scores match those expected.
     """
     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)