Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/components/cloud/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ def test_constructor_loads_info_from_config():
assert cl.relayer == 'test-relayer'


@asyncio.coroutine
def test_initialize_loads_info(mock_os, hass):
async def test_initialize_loads_info(mock_os, hass):
"""Test initialize will load info from config file."""
mock_os.path.isfile.return_value = True
mopen = mock_open(read_data=json.dumps({
Expand All @@ -88,8 +87,10 @@ def test_initialize_loads_info(mock_os, hass):
cl.iot.connect.return_value = mock_coro()

with patch('homeassistant.components.cloud.open', mopen, create=True), \
patch('homeassistant.components.cloud.Cloud._fetch_jwt_keyset',
return_value=mock_coro(True)), \
patch('homeassistant.components.cloud.Cloud._decode_claims'):
yield from cl.async_start(None)
await cl.async_start(None)

assert cl.id_token == 'test-id-token'
assert cl.access_token == 'test-access-token'
Expand Down
2 changes: 1 addition & 1 deletion tests/components/homekit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def hk_driver():
patch('pyhap.accessory_driver.AccessoryEncoder'), \
patch('pyhap.accessory_driver.HAPServer'), \
patch('pyhap.accessory_driver.AccessoryDriver.publish'):
return AccessoryDriver(pincode=b'123-45-678')
return AccessoryDriver(pincode=b'123-45-678', address='127.0.0.1')