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:
Fabian Affolter 2019-01-16 23:23:46 +01:00 committed by Paulus Schoutsen
parent 368682647d
commit 9bb7e40ee3
4 changed files with 6 additions and 17 deletions

View file

@ -1,4 +1,4 @@
aiohttp==3.5.1
aiohttp==3.5.4
astral==1.7.1
async_timeout==3.0.1
attrs==18.2.0

View file

@ -1,5 +1,5 @@
# Home Assistant core
aiohttp==3.5.1
aiohttp==3.5.4
astral==1.7.1
async_timeout==3.0.1
attrs==18.2.0

View file

@ -32,7 +32,7 @@ PROJECT_URLS = {
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
REQUIRES = [
'aiohttp==3.5.1',
'aiohttp==3.5.4',
'astral==1.7.1',
'async_timeout==3.0.1',
'attrs==18.2.0',

View file

@ -4,14 +4,12 @@ import io
from datetime import timedelta
from homeassistant import core as ha
from homeassistant.components import webhook
from homeassistant.setup import async_setup_component
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."""
await async_setup_component(hass, webhook.DOMAIN, {})
await async_setup_component(hass, 'camera', {
'camera': {
'platform': 'push',
@ -23,17 +21,9 @@ async def test_bad_posting(aioclient_mock, hass, aiohttp_client):
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
camera_state = hass.states.get('camera.config_test')
assert camera_state.state == 'idle'
resp = await client.post('/api/webhook/camera.config_test')
assert resp.status == 200 # webhooks always return 200
async with client.post('/api/webhook/camera.config_test') as resp:
assert resp.status == 200 # webhooks always return 200
camera_state = hass.states.get('camera.config_test')
assert camera_state.state == 'idle' # no file supplied we are still idle
@ -41,7 +31,6 @@ async def test_bad_posting(aioclient_mock, hass, aiohttp_client):
async def test_posting_url(hass, aiohttp_client):
"""Test that posting to api endpoint works."""
await async_setup_component(hass, webhook.DOMAIN, {})
await async_setup_component(hass, 'camera', {
'camera': {
'platform': 'push',