Skip to content

Commit

Permalink
[#190] fix additional renames of id_value
Browse files Browse the repository at this point in the history
  • Loading branch information
marisahoenig committed Oct 27, 2020
1 parent 4da6d3f commit 119bbfd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/notifications/process_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def persist_notification(
_recipient_identifier = RecipientIdentifier(
notification_id=notification_id,
id_type=recipient_identifier['id_type'],
id_value=recipient_identifier['value']
id_value=recipient_identifier['id_value']
)
notification.recipient_identifiers.set(_recipient_identifier)

Expand Down
6 changes: 3 additions & 3 deletions tests/app/dao/notification_dao/test_notification_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def test_should_delete_recipient_identifiers_if_notification_deleted(
'app.notifications.process_notifications.accept_recipient_identifiers_enabled',
return_value=True
)
recipient_identifier = {'id_type': VA_PROFILE_ID, 'value': 'foo'}
recipient_identifier = {'id_type': VA_PROFILE_ID, 'id_value': 'foo'}
notification = persist_notification(
template_id=sample_job.template.id,
template_version=sample_job.template.version,
Expand All @@ -625,14 +625,14 @@ def test_should_delete_recipient_identifiers_if_notification_deleted(
recipient_identifier=recipient_identifier
)
assert RecipientIdentifier.query.get(
(notification.id, recipient_identifier['id_type'], recipient_identifier['value'])) \
(notification.id, recipient_identifier['id_type'], recipient_identifier['id_value'])) \
.notification_id == notification.id

dao_delete_notification_by_id(notification.id)

assert Notification.query.get(notification.id) is None
assert RecipientIdentifier.query.get(
(notification.id, recipient_identifier['id_type'], recipient_identifier['value'])) is None
(notification.id, recipient_identifier['id_type'], recipient_identifier['id_value'])) is None


def test_should_delete_notification_and_ignore_history_for_research_mode(sample_template):
Expand Down
2 changes: 1 addition & 1 deletion tests/app/notifications/test_process_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def test_persist_notification_persists_recipient_identifiers(
'app.notifications.process_notifications.accept_recipient_identifiers_enabled',
return_value=True
)
recipient_identifier = {'id_type': id_type, 'value': id_value}
recipient_identifier = {'id_type': id_type, 'id_value': id_value}
notification = persist_notification(
template_id=sample_job.template.id,
template_version=sample_job.template.version,
Expand Down

0 comments on commit 119bbfd

Please sign in to comment.