From bbb7cadb6274e67cd66291ab75be56edf6faa1bb Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 1 Jul 2025 13:48:02 -0700 Subject: [PATCH] more tests --- tests/app/celery/test_tasks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/app/celery/test_tasks.py b/tests/app/celery/test_tasks.py index 52fbf2bb6..d3d794a32 100644 --- a/tests/app/celery/test_tasks.py +++ b/tests/app/celery/test_tasks.py @@ -1751,7 +1751,8 @@ def test_save_api_email_or_sms_integrity_error(): "app.celery.tasks.current_app.logger.warning" ) as mock_log: - save_api_email_or_sms(mock_self, encrypted) - mock_log.assert_called_once() - assert "already exists" in mock_log.call_args[0][0] - mock_self.retry.assert_not_called() + with pytest.raises(IntegrityError): + save_api_email_or_sms(mock_self, encrypted) + mock_log.assert_called_once() + assert "already exists" in mock_log.call_args[0][0] + mock_self.retry.assert_not_called()