From 221bb5ad520eb5e0891d178e955af992805cfd91 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 25 Oct 2020 08:44:39 -0500 Subject: [PATCH] Upgrade to aiohttp 3.7.1 (#42305) --- homeassistant/package_constraints.txt | 2 +- requirements.txt | 2 +- setup.py | 2 +- tests/components/webhook/test_trigger.py | 11 +++++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index ca86d99eb30..7f1793f605e 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -1,6 +1,6 @@ PyJWT==1.7.1 PyNaCl==1.3.0 -aiohttp==3.6.2 +aiohttp==3.7.1 aiohttp_cors==0.7.0 astral==1.10.1 async_timeout==3.0.1 diff --git a/requirements.txt b/requirements.txt index 5bee6b7f944..d5c0d1ebd28 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -c homeassistant/package_constraints.txt # Home Assistant Core -aiohttp==3.6.2 +aiohttp==3.7.1 astral==1.10.1 async_timeout==3.0.1 attrs==19.3.0 diff --git a/setup.py b/setup.py index 490a7da56b8..fa488b5ed8f 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ PROJECT_URLS = { PACKAGES = find_packages(exclude=["tests", "tests.*"]) REQUIRES = [ - "aiohttp==3.6.2", + "aiohttp==3.7.1", "astral==1.10.1", "async_timeout==3.0.1", "attrs==19.3.0", diff --git a/tests/components/webhook/test_trigger.py b/tests/components/webhook/test_trigger.py index 30601ef6bec..bb3cb680743 100644 --- a/tests/components/webhook/test_trigger.py +++ b/tests/components/webhook/test_trigger.py @@ -12,6 +12,7 @@ async def setup_http(hass): """Set up http.""" assert await async_setup_component(hass, "http", {}) assert await async_setup_component(hass, "webhook", {}) + await hass.async_block_till_done() async def test_webhook_json(hass, aiohttp_client): @@ -38,10 +39,12 @@ async def test_webhook_json(hass, aiohttp_client): } }, ) + await hass.async_block_till_done() client = await aiohttp_client(hass.http.app) await client.post("/api/webhook/json_webhook", json={"hello": "world"}) + await hass.async_block_till_done() assert len(events) == 1 assert events[0].data["hello"] == "yo world" @@ -71,10 +74,12 @@ async def test_webhook_post(hass, aiohttp_client): } }, ) + await hass.async_block_till_done() client = await aiohttp_client(hass.http.app) await client.post("/api/webhook/post_webhook", data={"hello": "world"}) + await hass.async_block_till_done() assert len(events) == 1 assert events[0].data["hello"] == "yo world" @@ -104,10 +109,12 @@ async def test_webhook_query(hass, aiohttp_client): } }, ) + await hass.async_block_till_done() client = await aiohttp_client(hass.http.app) await client.post("/api/webhook/query_webhook?hello=world") + await hass.async_block_till_done() assert len(events) == 1 assert events[0].data["hello"] == "yo world" @@ -137,10 +144,12 @@ async def test_webhook_reload(hass, aiohttp_client): } }, ) + await hass.async_block_till_done() client = await aiohttp_client(hass.http.app) await client.post("/api/webhook/post_webhook", data={"hello": "world"}) + await hass.async_block_till_done() assert len(events) == 1 assert events[0].data["hello"] == "yo world" @@ -163,8 +172,10 @@ async def test_webhook_reload(hass, aiohttp_client): "reload", blocking=True, ) + await hass.async_block_till_done() await client.post("/api/webhook/post_webhook", data={"hello": "world"}) + await hass.async_block_till_done() assert len(events) == 2 assert events[1].data["hello"] == "yo2 world"