MCPcopy
hub / github.com/encode/httpx / test_download

Function test_download

tests/test_main.py:171–178  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

169
170
171def test_download(server):
172 url = str(server.url)
173 runner = CliRunner()
174 with runner.isolated_filesystem():
175 runner.invoke(httpx.main, [url, "--download", "index.txt"])
176 assert os.path.exists("index.txt")
177 with open("index.txt", "r") as input_file:
178 assert input_file.read() == "Hello, world!"
179
180
181def test_errors():

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected