コード例 #1
0
 def test_gating_disabled(self, mock_gating_milestone):
     evaluate_subsection_gated_milestones(
         sender=None,
         user=self.user,
         course=self.course,
         subsection_grade=self.subsection_grade,
     )
     self.assertFalse(mock_gating_milestone.called)
コード例 #2
0
 def test_gating_disabled(self, mock_gating_milestone):
     evaluate_subsection_gated_milestones(
         sender=None,
         user=self.user,
         course=self.course,
         subsection_grade=self.subsection_grade,
     )
     self.assertFalse(mock_gating_milestone.called)
コード例 #3
0
 def test_gating_enabled(self, mock_gating_milestone):
     self.course.enable_subsection_gating = True
     modulestore().update_item(self.course, 0)
     evaluate_subsection_gated_milestones(
         sender=None,
         user=self.user,
         course=self.course,
         subsection_grade=self.subsection_grade,
     )
     self.assertTrue(mock_gating_milestone.called)
コード例 #4
0
 def test_gating_enabled(self, mock_gating_milestone):
     self.course.enable_subsection_gating = True
     modulestore().update_item(self.course, 0)
     evaluate_subsection_gated_milestones(
         sender=None,
         user=self.user,
         course=self.course,
         subsection_grade=self.subsection_grade,
     )
     self.assertTrue(mock_gating_milestone.called)