Skip to content

Commit

Permalink
Flake8 fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Tanner Lewis <[email protected]>
  • Loading branch information
lewijacn committed Sep 20, 2024
1 parent 346ef9c commit 21724b9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from console_link.models.client_options import ClientOptions
from console_link.models.utils import append_user_agent_header_for_requests,create_boto3_client
from console_link.models.utils import append_user_agent_header_for_requests, create_boto3_client
import requests.utils


Expand All @@ -11,12 +11,14 @@ def test_create_boto3_client_no_user_agent():
user_agent_for_client = client.meta.config.user_agent
assert "Boto3" in user_agent_for_client


def test_create_boto3_client_with_user_agent():
client_options = ClientOptions(config={"user_agent_extra": USER_AGENT_EXTRA})
client = create_boto3_client(aws_service_name="ecs", client_options=client_options)
user_agent_for_client = client.meta.config.user_agent
assert "Boto3" in user_agent_for_client
assert USER_AGENT_EXTRA in user_agent_for_client
assert USER_AGENT_EXTRA in user_agent_for_client


def test_append_user_agent_header_for_requests_no_headers():
expected_headers = {"User-Agent": f"{requests.utils.default_user_agent()} {USER_AGENT_EXTRA}"}
Expand Down

0 comments on commit 21724b9

Please sign in to comment.