mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Upgrade aiohttp to 3.5.3 (#19957)
* Upgrade aiohttp to 3.5.3 * Upgrade aiohttp to 3.5.4 * Remove test for webhook component from camera.push * Lint
This commit is contained in:
parent
368682647d
commit
9bb7e40ee3
@ -1,4 +1,4 @@
|
|||||||
aiohttp==3.5.1
|
aiohttp==3.5.4
|
||||||
astral==1.7.1
|
astral==1.7.1
|
||||||
async_timeout==3.0.1
|
async_timeout==3.0.1
|
||||||
attrs==18.2.0
|
attrs==18.2.0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Home Assistant core
|
# Home Assistant core
|
||||||
aiohttp==3.5.1
|
aiohttp==3.5.4
|
||||||
astral==1.7.1
|
astral==1.7.1
|
||||||
async_timeout==3.0.1
|
async_timeout==3.0.1
|
||||||
attrs==18.2.0
|
attrs==18.2.0
|
||||||
|
2
setup.py
2
setup.py
@ -32,7 +32,7 @@ PROJECT_URLS = {
|
|||||||
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
|
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
|
||||||
|
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
'aiohttp==3.5.1',
|
'aiohttp==3.5.4',
|
||||||
'astral==1.7.1',
|
'astral==1.7.1',
|
||||||
'async_timeout==3.0.1',
|
'async_timeout==3.0.1',
|
||||||
'attrs==18.2.0',
|
'attrs==18.2.0',
|
||||||
|
@ -4,14 +4,12 @@ import io
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
from homeassistant import core as ha
|
from homeassistant import core as ha
|
||||||
from homeassistant.components import webhook
|
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
|
|
||||||
async def test_bad_posting(aioclient_mock, hass, aiohttp_client):
|
async def test_bad_posting(hass, aiohttp_client):
|
||||||
"""Test that posting to wrong api endpoint fails."""
|
"""Test that posting to wrong api endpoint fails."""
|
||||||
await async_setup_component(hass, webhook.DOMAIN, {})
|
|
||||||
await async_setup_component(hass, 'camera', {
|
await async_setup_component(hass, 'camera', {
|
||||||
'camera': {
|
'camera': {
|
||||||
'platform': 'push',
|
'platform': 'push',
|
||||||
@ -23,16 +21,8 @@ async def test_bad_posting(aioclient_mock, hass, aiohttp_client):
|
|||||||
|
|
||||||
client = await aiohttp_client(hass.http.app)
|
client = await aiohttp_client(hass.http.app)
|
||||||
|
|
||||||
# wrong webhook
|
|
||||||
files = {'image': io.BytesIO(b'fake')}
|
|
||||||
resp = await client.post('/api/webhood/camera.wrong', data=files)
|
|
||||||
assert resp.status == 404
|
|
||||||
|
|
||||||
# missing file
|
# missing file
|
||||||
camera_state = hass.states.get('camera.config_test')
|
async with client.post('/api/webhook/camera.config_test') as resp:
|
||||||
assert camera_state.state == 'idle'
|
|
||||||
|
|
||||||
resp = await client.post('/api/webhook/camera.config_test')
|
|
||||||
assert resp.status == 200 # webhooks always return 200
|
assert resp.status == 200 # webhooks always return 200
|
||||||
|
|
||||||
camera_state = hass.states.get('camera.config_test')
|
camera_state = hass.states.get('camera.config_test')
|
||||||
@ -41,7 +31,6 @@ async def test_bad_posting(aioclient_mock, hass, aiohttp_client):
|
|||||||
|
|
||||||
async def test_posting_url(hass, aiohttp_client):
|
async def test_posting_url(hass, aiohttp_client):
|
||||||
"""Test that posting to api endpoint works."""
|
"""Test that posting to api endpoint works."""
|
||||||
await async_setup_component(hass, webhook.DOMAIN, {})
|
|
||||||
await async_setup_component(hass, 'camera', {
|
await async_setup_component(hass, 'camera', {
|
||||||
'camera': {
|
'camera': {
|
||||||
'platform': 'push',
|
'platform': 'push',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user