1 parent
ae9e3d83d7
commit
d1a621601d
42 files changed
+307
-473
No files matched your search
@@ -9,12 +9,12 @@ from homeassistant.config import DATA_CUSTOMIZE
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_get_entity(hass, aiohttp_client):
|
||||
def test_get_entity(hass, hass_client):
|
||||
"""Test getting entity."""
|
||||
with patch.object(config, 'SECTIONS', ['customize']):
|
||||
yield from async_setup_component(hass, 'config', {})
|
||||
|
||||
client = yield from aiohttp_client(hass.http.app)
|
||||
client = yield from hass_client()
|
||||
|
||||
def mock_read(path):
|
||||
"""Mock reading data."""
|
||||
@@ -38,12 +38,12 @@ def test_get_entity(hass, aiohttp_client):
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_update_entity(hass, aiohttp_client):
|
||||
def test_update_entity(hass, hass_client):
|
||||
"""Test updating entity."""
|
||||
with patch.object(config, 'SECTIONS', ['customize']):
|
||||
yield from async_setup_component(hass, 'config', {})
|
||||
|
||||
client = yield from aiohttp_client(hass.http.app)
|
||||
client = yield from hass_client()
|
||||
|
||||
orig_data = {
|
||||
'hello.beer': {
|
||||
@@ -89,12 +89,12 @@ def test_update_entity(hass, aiohttp_client):
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_update_entity_invalid_key(hass, aiohttp_client):
|
||||
def test_update_entity_invalid_key(hass, hass_client):
|
||||
"""Test updating entity."""
|
||||
with patch.object(config, 'SECTIONS', ['customize']):
|
||||
yield from async_setup_component(hass, 'config', {})
|
||||
|
||||
client = yield from aiohttp_client(hass.http.app)
|
||||
client = yield from hass_client()
|
||||
|
||||
resp = yield from client.post(
|
||||
'/api/config/customize/config/not_entity', data=json.dumps({
|
||||
@@ -105,12 +105,12 @@ def test_update_entity_invalid_key(hass, aiohttp_client):
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_update_entity_invalid_json(hass, aiohttp_client):
|
||||
def test_update_entity_invalid_json(hass, hass_client):
|
||||
"""Test updating entity."""
|
||||
with patch.object(config, 'SECTIONS', ['customize']):
|
||||
yield from async_setup_component(hass, 'config', {})
|
||||
|
||||
client = yield from aiohttp_client(hass.http.app)
|
||||
client = yield from hass_client()
|
||||
|
||||
resp = yield from client.post(
|
||||
'/api/config/customize/config/hello.beer', data='not json')
|
||||
|
||||
Reference in new issue
Block a user