Example #1
0
    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)
Example #2
0
    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