more tests

This commit is contained in:
Kenneth Kehl
2025-07-01 13:48:02 -07:00
parent 00705215a2
commit bbb7cadb62

View File

@@ -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()