'Ensures that known errors are not logged before a retry.'

@patch('lms.djangoapps.grades.tasks.log')
@patch('lms.djangoapps.grades.tasks.recalculate_subsection_grade_v3.retry')
@patch('lms.djangoapps.grades.new.subsection_grade_factory.SubsectionGradeFactory.update')
def test_no_log_known_error(self, mock_update, mock_retry, mock_log):

    self.set_up_course()
    mock_update.side_effect = IntegrityError('race    condition    oh    noes')
    self._apply_recalculate_subsection_grade()
    self.assertFalse(mock_log.info.called)
    self._assert_retry_called(mock_retry)
