diff --git a/tests/app/celery/test_tasks.py b/tests/app/celery/test_tasks.py index f1591f81d..f9d48aced 100644 --- a/tests/app/celery/test_tasks.py +++ b/tests/app/celery/test_tasks.py @@ -1789,7 +1789,7 @@ def test_save_api_email_or_sms_sqlalchemy_error_with_max_retries(): "app.celery.tasks.current_app.logger.exception" ) as mock_exception: - with pytest.raises(SQLAlchemyError): - save_api_email_or_sms(mock_self, encrypted) - mock_exception.assert_called_once() - assert "Max retry failed" in mock_exception.call_args[0][0] + + save_api_email_or_sms(mock_self, encrypted) + mock_exception.assert_called_once() + assert "Max retry failed" in mock_exception.call_args[0][0]