MCPcopy Index your code
hub / github.com/aws/aws-cli / assert_expected_user_agent

Function assert_expected_user_agent

tests/functional/test_useragent.py:9–21  ·  view source on GitHub ↗
(result, service, operation)

Source from the content-addressed store, hash-verified

7
8
9def assert_expected_user_agent(result, service, operation):
10 ua_string = result.aws_requests[0].http_requests[0].headers['User-Agent']
11 assert ua_string.startswith(f'aws-cli/{awscli_version}')
12 assert ' md/installer#' in ua_string
13 assert ' md/awscrt#' in ua_string
14 assert ' md/arch#' in ua_string
15 assert ' md/prompt#off' in ua_string
16 assert f' md/command#{service}.{operation}' in ua_string
17 assert ' ua/2.1 ' in ua_string
18 assert ' os/' in ua_string
19 assert ' lang/python' in ua_string
20 assert ' cfg/' in ua_string
21 assert f' md/command#{service}.{operation}' in ua_string
22
23
24def test_basic_user_agent():

Callers 2

test_basic_user_agentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected