mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -04:00
Some minor refactoring.
- Updated notifications_dao.update_notification_status_by_id with an optional parameter to set the sent_by, this will eliminate a separate update to notifcaitons. - Added the callback url to the log message, that way we can see if it's the same url failing. - Stop sending the status callbacks for PENDING status.
This commit is contained in:
@@ -141,6 +141,14 @@ def test_should_update_status_by_id_if_created(notify_db, notify_db_session):
|
||||
assert updated.status == 'failed'
|
||||
|
||||
|
||||
def test_should_update_status_by_id_and_set_sent_by(notify_db, notify_db_session):
|
||||
notification = sample_notification(notify_db, notify_db_session, status='sending')
|
||||
|
||||
updated = update_notification_status_by_id(notification.id, 'delivered', sent_by='mmg')
|
||||
assert updated.status == 'delivered'
|
||||
assert updated.sent_by == 'mmg'
|
||||
|
||||
|
||||
def test_should_not_update_status_by_reference_if_from_country_with_no_delivery_receipts(sample_template):
|
||||
notification = create_notification(
|
||||
sample_template,
|
||||
|
||||
Reference in New Issue
Block a user