mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
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:
committed by
Martin Hjelmare
parent
632b2042e4
commit
d7b61f7ff6
12
tests/components/mqtt/conftest.py
Normal file
12
tests/components/mqtt/conftest.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""Test fixtures for mqtt component."""
|
||||
import pytest
|
||||
|
||||
from tests.common import async_mock_mqtt_component
|
||||
|
||||
|
||||
@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
|
||||
Reference in New Issue
Block a user