2020-07-03 10:22:02 +02:00
|
|
|
"""Common test tools."""
|
|
|
|
from unittest import mock
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
2020-07-12 22:03:22 +02:00
|
|
|
@pytest.fixture(autouse=True, name="rfxtrx")
|
|
|
|
async def rfxtrx(hass):
|
2020-07-03 10:22:02 +02:00
|
|
|
"""Fixture that cleans up threads from integration."""
|
|
|
|
|
2020-07-12 22:03:22 +02:00
|
|
|
with mock.patch("RFXtrx.Connect") as connect, mock.patch("RFXtrx.DummyTransport2"):
|
|
|
|
yield connect.return_value
|