mirror of
https://github.com/home-assistant/core.git
synced 2026-05-19 23:35:20 +02:00
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:
@@ -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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user