Skip to content

Commit

Permalink
more assertions for http_transport tests
Browse files Browse the repository at this point in the history
  • Loading branch information
650elx committed Dec 18, 2024
1 parent 2f7267f commit 7895231
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/integration/test_http_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand All @@ -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"

0 comments on commit 7895231

Please sign in to comment.