mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-18 05:30:48 -04:00
Add fetch request for service inbound api.
Add unique constraint on service_id for service_inbound_api.
This commit is contained in:
@@ -2219,3 +2219,13 @@ def test_update_service_inbound_api_updates_bearer_token(client, sample_service)
|
||||
resp_json = json.loads(response.get_data(as_text=True))["data"]
|
||||
assert get_secret(resp_json["bearer_token"]) == "different_token"
|
||||
assert service_inbound_api.unsigned_bearer_token == "different_token"
|
||||
|
||||
|
||||
def test_fetch_service_inbound_api(client, sample_service):
|
||||
service_inbound_api = create_service_inbound_api(service=sample_service)
|
||||
|
||||
response = client.get("/service/{}/inbound-api/{}".format(sample_service.id, service_inbound_api.id),
|
||||
headers=[create_authorization_header()])
|
||||
|
||||
assert response.status_code == 200
|
||||
assert json.loads(response.get_data(as_text=True))["data"] == service_inbound_api.serialize()
|
||||
|
||||
Reference in New Issue
Block a user