mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix http test DeprecationWarnings (#97737)
This commit is contained in:
parent
f68f9d4e01
commit
b23b2ac2e8
@ -75,7 +75,7 @@ async def test_bad_requests(
|
|||||||
fail_on_query_string,
|
fail_on_query_string,
|
||||||
aiohttp_client: ClientSessionGenerator,
|
aiohttp_client: ClientSessionGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
loop,
|
event_loop,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test request paths that should be filtered."""
|
"""Test request paths that should be filtered."""
|
||||||
app = web.Application()
|
app = web.Application()
|
||||||
@ -93,7 +93,7 @@ async def test_bad_requests(
|
|||||||
man_params = ""
|
man_params = ""
|
||||||
|
|
||||||
http = urllib3.PoolManager()
|
http = urllib3.PoolManager()
|
||||||
resp = await loop.run_in_executor(
|
resp = await event_loop.run_in_executor(
|
||||||
None,
|
None,
|
||||||
http.request,
|
http.request,
|
||||||
"GET",
|
"GET",
|
||||||
@ -126,7 +126,7 @@ async def test_bad_requests_with_unsafe_bytes(
|
|||||||
fail_on_query_string,
|
fail_on_query_string,
|
||||||
aiohttp_client: ClientSessionGenerator,
|
aiohttp_client: ClientSessionGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
loop,
|
event_loop,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test request with unsafe bytes in their URLs."""
|
"""Test request with unsafe bytes in their URLs."""
|
||||||
app = web.Application()
|
app = web.Application()
|
||||||
@ -144,7 +144,7 @@ async def test_bad_requests_with_unsafe_bytes(
|
|||||||
man_params = ""
|
man_params = ""
|
||||||
|
|
||||||
http = urllib3.PoolManager()
|
http = urllib3.PoolManager()
|
||||||
resp = await loop.run_in_executor(
|
resp = await event_loop.run_in_executor(
|
||||||
None,
|
None,
|
||||||
http.request,
|
http.request,
|
||||||
"GET",
|
"GET",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user