MCPcopy
hub / github.com/pex-tool/pex / test_user_agent

Function test_user_agent

tests/test_fetcher.py:50–57  ·  view source on GitHub ↗
(server_address)

Source from the content-addressed store, hash-verified

48
49
50def test_user_agent(server_address):
51 # type: (Tuple[str, int]) -> None
52
53 host, port = server_address
54 url = "http://{host}:{port}".format(host=host, port=port)
55 url_fetcher = URLFetcher()
56 with url_fetcher.get_body_stream(url) as fp:
57 assert "pex/{version}".format(version=__version__) == fp.read().decode("utf-8")

Callers

nothing calls this directly

Calls 4

get_body_streamMethod · 0.95
URLFetcherClass · 0.90
decodeMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected