From 7895231870db57ba7c580ecd80f1baea93c8d3fd Mon Sep 17 00:00:00 2001 From: 650elx Date: Wed, 18 Dec 2024 16:05:27 +0100 Subject: [PATCH] more assertions for http_transport tests --- tests/integration/test_http_transport.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_http_transport.py b/tests/integration/test_http_transport.py index 8c5d4c7..af4e44a 100644 --- a/tests/integration/test_http_transport.py +++ b/tests/integration/test_http_transport.py @@ -15,6 +15,10 @@ def test_authenticate_method_with_service_plan_id_version_of_sms_api( assert empty_http_request.headers assert "Bearer" in empty_http_request.headers["Authorization"] + assert ( + empty_http_request.headers["Authorization"] == + f"Bearer {sinch_client_sync_with_service_plan_id.configuration.sms_api_token}" + ) assert empty_http_request.headers["Content-Type"] == "application/json" @@ -30,5 +34,8 @@ def test_authenticate_method_with_project_id_version_of_sms_api( http_transport.authenticate(endpoint=sms_endpoint, request_data=empty_http_request) assert empty_http_request.headers - assert "Bearer" in empty_http_request.headers["Authorization"] + assert ( + empty_http_request.headers["Authorization"] == + f"Bearer {sinch_client_sync.configuration.token_manager.token.access_token}" + ) assert empty_http_request.headers["Content-Type"] == "application/json"