Skip to content
Myr

Make the MockTransport example more robust/correct (#1621)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Vytautas Liuolia · committed by GitHub · parent 2129a97 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/advanced.md+1 added-1 removed
1098 unmodified lines
1099 return httpx.Response(200, json={"text": "Hello, world!"})110011011102# Switch to a mock transport, if the TESTING environment variable is set.1103if os.environ['TESTING'].upper() == "TRUE":1103if os.environ.get('TESTING', '').upper() == "TRUE":1104 transport = httpx.MockTransport(handler)1105else:1106 transport = httpx.HTTPTransport()1107
68 unmodified lines