Move mqtt_mock to tests/components/mqtt/conftest.py (#20621)
* Move mqtt_mock to tests/components/mqtt/conftest.py * Move mqtt room presence sensor test to tests/components/mqtt * Revert "Move mqtt room presence sensor test to tests/components/mqtt" This reverts commit e08bc143 * Decouple mqtt room presence sensor test and mqtt_mock
This commit is contained in:
parent
632b2042e4
commit
d7b61f7ff6
4 changed files with 67 additions and 33 deletions
|
@ -14,7 +14,7 @@ from homeassistant.auth.const import GROUP_ID_ADMIN, GROUP_ID_READ_ONLY
|
|||
from homeassistant.auth.providers import legacy_api_password, homeassistant
|
||||
|
||||
from tests.common import (
|
||||
async_test_home_assistant, INSTANCES, async_mock_mqtt_component, mock_coro,
|
||||
async_test_home_assistant, INSTANCES, mock_coro,
|
||||
mock_storage as mock_storage, MockUser, CLIENT_ID)
|
||||
from tests.test_util.aiohttp import mock_aiohttp_client
|
||||
from tests.mock.zwave import MockNetwork, MockOption
|
||||
|
@ -92,14 +92,6 @@ def aioclient_mock():
|
|||
yield mock_session
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mqtt_mock(loop, hass):
|
||||
"""Fixture to mock MQTT."""
|
||||
client = loop.run_until_complete(async_mock_mqtt_component(hass))
|
||||
client.reset_mock()
|
||||
return client
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_openzwave():
|
||||
"""Mock out Open Z-Wave."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue