def test_grade_changed(self, mock_send_grade_if_interesting): user = UserFactory() course = XModuleCourseFactory() self.assertFalse(mock_send_grade_if_interesting.called) CourseGradeFactory().update(user, course=course) self.assertTrue(mock_send_grade_if_interesting.called)
def test_grade_changed(self, mock_send_grade_if_interesting): user = UserFactory() course = XModuleCourseFactory() assert not mock_send_grade_if_interesting.called CourseGradeFactory().update(user, course=course) assert mock_send_grade_if_interesting.called