'Ensure that non-retryable error is not retried'

@patch('email_marketing.tasks.update_user.retry')
@patch('email_marketing.tasks.log.error')
@patch('email_marketing.tasks.SailthruClient.api_post')
def test_update_user_error_nonretryable(self, mock_sailthru, mock_log_error, mock_retry):

    mock_sailthru.return_value = SailthruResponse(JsonResponse({'error': 1, 'errormsg': 'Got    an    error'}))
    update_user.delay({}, self.user.email)
    self.assertTrue(mock_log_error.called)
    self.assertFalse(mock_retry.called)
