mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
more tests
This commit is contained in:
@@ -1751,6 +1751,7 @@ def test_save_api_email_or_sms_integrity_error():
|
|||||||
"app.celery.tasks.current_app.logger.warning"
|
"app.celery.tasks.current_app.logger.warning"
|
||||||
) as mock_log:
|
) as mock_log:
|
||||||
|
|
||||||
|
with pytest.raises(IntegrityError):
|
||||||
save_api_email_or_sms(mock_self, encrypted)
|
save_api_email_or_sms(mock_self, encrypted)
|
||||||
mock_log.assert_called_once()
|
mock_log.assert_called_once()
|
||||||
assert "already exists" in mock_log.call_args[0][0]
|
assert "already exists" in mock_log.call_args[0][0]
|
||||||
|
|||||||
Reference in New Issue
Block a user