mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -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:
@@ -640,14 +640,15 @@ def test_get_notification_selects_correct_template_for_personalisation(notify_ap
|
||||
auth_header = create_authorization_header(service_id=sample_template.service_id)
|
||||
|
||||
response = client.get(path='/notifications', headers=[auth_header])
|
||||
assert response.status_code == 200
|
||||
|
||||
resp = json.loads(response.get_data(as_text=True))
|
||||
assert len(resp['notifications']) == 2
|
||||
assert resp['notifications'][0]['template_version'] == 1
|
||||
assert resp['notifications'][0]['body'] == 'This is a template'
|
||||
assert resp['notifications'][1]['template_version'] == 2
|
||||
assert resp['notifications'][1]['body'] == 'foo'
|
||||
assert response.status_code == 200
|
||||
|
||||
resp = json.loads(response.get_data(as_text=True))
|
||||
assert len(resp['notifications']) == 2
|
||||
assert resp['notifications'][0]['template_version'] == 1
|
||||
assert resp['notifications'][0]['body'] == 'This is a template'
|
||||
assert resp['notifications'][1]['template_version'] == 2
|
||||
assert resp['notifications'][1]['body'] == 'foo'
|
||||
|
||||
|
||||
def _create_auth_header_from_key(api_key):
|
||||
|
||||
Reference in New Issue
Block a user