1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix aiohttp deprecation warnings (#13240)

* Fix aiohttp deprecation warnings

* Fix Ring deprecation warning

* Lint
This commit is contained in:
Paulus Schoutsen
2018-03-15 13:49:49 -07:00
committed by Pascal Vizeli
parent a86bf81768
commit 89a19c89a7
45 changed files with 221 additions and 225 deletions

View File

@@ -1199,10 +1199,10 @@ def test_unsupported_domain(hass):
@asyncio.coroutine
def do_http_discovery(config, hass, test_client):
def do_http_discovery(config, hass, aiohttp_client):
"""Submit a request to the Smart Home HTTP API."""
yield from async_setup_component(hass, alexa.DOMAIN, config)
http_client = yield from test_client(hass.http.app)
http_client = yield from aiohttp_client(hass.http.app)
request = get_new_request('Alexa.Discovery', 'Discover')
response = yield from http_client.post(
@@ -1213,7 +1213,7 @@ def do_http_discovery(config, hass, test_client):
@asyncio.coroutine
def test_http_api(hass, test_client):
def test_http_api(hass, aiohttp_client):
"""With `smart_home:` HTTP API is exposed."""
config = {
'alexa': {
@@ -1221,7 +1221,7 @@ def test_http_api(hass, test_client):
}
}
response = yield from do_http_discovery(config, hass, test_client)
response = yield from do_http_discovery(config, hass, aiohttp_client)
response_data = yield from response.json()
# Here we're testing just the HTTP view glue -- details of discovery are
@@ -1230,12 +1230,12 @@ def test_http_api(hass, test_client):
@asyncio.coroutine
def test_http_api_disabled(hass, test_client):
def test_http_api_disabled(hass, aiohttp_client):
"""Without `smart_home:`, the HTTP API is disabled."""
config = {
'alexa': {}
}
response = yield from do_http_discovery(config, hass, test_client)
response = yield from do_http_discovery(config, hass, aiohttp_client)
assert response.status == 404