Upgrade to aiohttp 3.7.1 (#42305)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-10-25 14:44:39 +01:00
1 parent 99e2d13668
commit 221bb5ad52
4 files changed
+14 -3

No files matched your search

+11
View File
@@ -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"