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)
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)