mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
add actual_template relationship to notification
also renamed the function to make it apparent that it'll join and grab personalisation
This commit is contained in:
@@ -23,7 +23,7 @@ from app.models import (
|
||||
from app.dao.notifications_dao import (
|
||||
dao_create_notification,
|
||||
dao_update_notification,
|
||||
get_notification,
|
||||
get_notification_with_personalisation,
|
||||
get_notification_for_job,
|
||||
get_notifications_for_job,
|
||||
dao_get_notification_statistics_for_service,
|
||||
@@ -57,7 +57,7 @@ def test_should_have_decorated_notifications_dao_functions():
|
||||
assert update_notification_status_by_reference.__wrapped__.__name__ == 'update_notification_status_by_reference' # noqa
|
||||
assert get_notification_for_job.__wrapped__.__name__ == 'get_notification_for_job' # noqa
|
||||
assert get_notifications_for_job.__wrapped__.__name__ == 'get_notifications_for_job' # noqa
|
||||
assert get_notification.__wrapped__.__name__ == 'get_notification' # noqa
|
||||
assert get_notification_with_personalisation.__wrapped__.__name__ == 'get_notification_with_personalisation' # noqa
|
||||
assert get_notifications_for_service.__wrapped__.__name__ == 'get_notifications_for_service' # noqa
|
||||
assert get_notification_by_id.__wrapped__.__name__ == 'get_notification_by_id' # noqa
|
||||
assert delete_notifications_created_more_than_a_week_ago.__wrapped__.__name__ == 'delete_notifications_created_more_than_a_week_ago' # noqa
|
||||
@@ -637,9 +637,11 @@ def test_save_notification_with_no_job(sample_template, mmg_provider):
|
||||
|
||||
|
||||
def test_get_notification(sample_notification):
|
||||
notification_from_db = get_notification(
|
||||
notification_from_db = get_notification_with_personalisation(
|
||||
sample_notification.service.id,
|
||||
sample_notification.id)
|
||||
sample_notification.id,
|
||||
key_type=None
|
||||
)
|
||||
assert sample_notification == notification_from_db
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user