test_timeouts.py
This file
Path
tests/test_timeouts.py
43 lines · 1.5 KiB · Python
Last changed by
Clean up 'backend' fixture (#664)Florimond Mancabefore adoptiond0427be
History of this fileTake it
The walk stopped after 200 commits: lines older than 3065dd6 point at it.
Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
lines 1–2why, one step back1import pytest2Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 3why, one step back3import httpxSet Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
lines 4–5why, one step back45Clean up 'backend' fixture (#664)Florimond Mancabefore adoptiond0427be
lines 6–7why, one step back6@pytest.mark.usefixtures("async_environment")7async def test_read_timeout(server):Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 8why, one step back8 timeout = httpx.Timeout(read_timeout=1e-6)Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
line 9why, one step back9Refactor tests in the light of backend auto-detection (#615)Florimond Mancabefore adoptionab41a5d
line 10why, one step back10 async with httpx.Client(timeout=timeout) as client:Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 11why, one step back11 with pytest.raises(httpx.ReadTimeout):Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
lines 12–14why, one step back12 await client.get(server.url.copy_with(path="/slow_response"))1314Clean up 'backend' fixture (#664)Florimond Mancabefore adoptiond0427be
lines 15–16why, one step back15@pytest.mark.usefixtures("async_environment")16async def test_write_timeout(server):Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 17why, one step back17 timeout = httpx.Timeout(write_timeout=1e-6)Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
line 18why, one step back18Refactor tests in the light of backend auto-detection (#615)Florimond Mancabefore adoptionab41a5d
line 19why, one step back19 async with httpx.Client(timeout=timeout) as client:Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 20why, one step back20 with pytest.raises(httpx.WriteTimeout):Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
lines 21–24why, one step back21 data = b"*" * 1024 * 1024 * 10022 await client.put(server.url.copy_with(path="/slow_response"), data=data)2324Clean up 'backend' fixture (#664)Florimond Mancabefore adoptiond0427be
lines 25–26why, one step back25@pytest.mark.usefixtures("async_environment")26async def test_connect_timeout(server):Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 27why, one step back27 timeout = httpx.Timeout(connect_timeout=1e-6)Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
line 28why, one step back28Refactor tests in the light of backend auto-detection (#615)Florimond Mancabefore adoptionab41a5d
line 29why, one step back29 async with httpx.Client(timeout=timeout) as client:Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 30why, one step back30 with pytest.raises(httpx.ConnectTimeout):Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
lines 31–34why, one step back31 # See https://stackoverflow.com/questions/100841/32 await client.get("http://10.255.255.1/")3334Clean up 'backend' fixture (#664)Florimond Mancabefore adoptiond0427be
lines 35–36why, one step back35@pytest.mark.usefixtures("async_environment")36async def test_pool_timeout(server):Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
lines 37–38why, one step back37 pool_limits = httpx.PoolLimits(hard_limit=1)38 timeout = httpx.Timeout(pool_timeout=1e-4)Set Host header when redirecting cross-origin (#321)Gaurav Dhameejabefore adoption3065dd6
line 39why, one step back39Refactor tests in the light of backend auto-detection (#615)Florimond Mancabefore adoptionab41a5d
line 40why, one step back40 async with httpx.Client(pool_limits=pool_limits, timeout=timeout) as client:Add Client.stream() method. (#600)Tom Christiebefore adoption8d8ea8b
line 41why, one step back41 async with client.stream("GET", server.url):Tighten up top-level API to only expose public API (#608)Tom Christiebefore adoptiond15dc0b
line 42why, one step back42 with pytest.raises(httpx.PoolTimeout):Add Client.stream() method. (#600)Tom Christiebefore adoption8d8ea8b
line 43why, one step back43 await client.get("http://localhost:8000/")