Split generating authorization headers by type

In response to [1].

[1]: https://github.com/alphagov/notifications-api/pull/3300#discussion_r681653248
This commit is contained in:
Ben Thorner
2021-08-04 15:12:09 +01:00
parent 5a1636e41f
commit 0312e2a528
33 changed files with 526 additions and 512 deletions

View File

@@ -4,7 +4,7 @@ from app.v2.notifications.notification_schemas import (
get_notification_response,
get_notifications_response,
)
from tests import create_authorization_header
from tests import create_service_authorization_header
from . import return_json_from_response, validate, validate_v0
@@ -16,7 +16,7 @@ def _get_notification(client, notification, url):
created_by=notification.service.created_by,
key_type=KEY_TYPE_NORMAL
))
auth_header = create_authorization_header(service_id=notification.service_id)
auth_header = create_service_authorization_header(service_id=notification.service_id)
return client.get(url, headers=[auth_header])