Test fixes (#22911)

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix more tests and manifests

* Fix demo/notify tests

* Rollback test for demo.geo_location
This commit is contained in:
Paulus Schoutsen
2019-04-08 23:16:55 -07:00
committed by GitHub
parent 1a05f7b04d
commit 590eead128
20 changed files with 68 additions and 48 deletions
+6 -4
View File
@@ -22,15 +22,16 @@ def mock_dev_track(mock_device_tracker_conf):
@pytest.fixture
def locative_client(loop, hass, hass_client):
async def locative_client(loop, hass, hass_client):
"""Locative mock client."""
assert loop.run_until_complete(async_setup_component(
assert await async_setup_component(
hass, DOMAIN, {
DOMAIN: {}
}))
})
await hass.async_block_till_done()
with patch('homeassistant.components.device_tracker.update_config'):
yield loop.run_until_complete(hass_client())
return await hass_client()
@pytest.fixture
@@ -45,6 +46,7 @@ async def webhook_id(hass, locative_client):
result = await hass.config_entries.flow.async_configure(
result['flow_id'], {})
assert result['type'] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
await hass.async_block_till_done()
return result['result'].data['webhook_id']