Skip to content
Myr

Fix extenstions typo in AsyncHTTPTransport (#1549)

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

authored by Jonas Lundberg · committed by GitHub · parent da2a334 · Browse files · 3 files+18 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

3 files+18 added−1 removed

  • tests:+17 added−0 removed
  • other:+1 added−1 removed

3 files+18 added−1 removed

modified:httpx/_transports/default.py+1 added-1 removed
262 unmodified lines
263 ) -> typing.Tuple[264 int, typing.List[typing.Tuple[bytes, bytes]], typing.AsyncIterable[bytes], dict265 ]:266 with map_httpcore_exceptions():267 status_code, headers, byte_stream, extenstions = await self._pool.arequest(267 status_code, headers, byte_stream, extensions = await self._pool.arequest(268 method=method,269 url=url,270 headers=headers,271 stream=httpcore.AsyncIteratorByteStream(stream.__aiter__()),
19 unmodified lines
modified:tests/client/test_async_client.py+9 added
311 unmodified lines
312 async with httpx.AsyncClient(transport=transport) as client:313 response = await client.get("https://www.example.com")314 assert response.status_code == 200315 assert response.text == "Hello, world!"316317318@pytest.mark.usefixtures("async_environment")319async def test_server_extensions(server):320 url = server.url321 async with httpx.AsyncClient(http2=True) as client:322 response = await client.get(url)323 assert response.status_code == 200324 assert response.extensions["http_version"] == b"HTTP/1.1"
modified:tests/client/test_client.py+8 added
381 unmodified lines
382383 response = client.get("https://www.example.com")384 assert response.status_code == 200385 assert response.json() == {"app": "mounted"}386387388def test_server_extensions(server):389 url = server.url.copy_with(path="/http_version_2")390 with httpx.Client(http2=True) as client:391 response = client.get(url)392 assert response.status_code == 200393 assert response.extensions["http_version"] == b"HTTP/1.1"