hass-core/tests/components/thread/conftest.py
Jc2k f7bfdfefde
Diagnostics report for Thread networks ()
* Initial diagnostics

* Include MLP of local OTBR

* Add dep on pyroute2

* Move pyroute2 onto executor

* More comments

* Read thread data direct from zeroconf cache

* Get neighbour cache for known BR's

* isort

* mypy

* Add diagnostic test

* rel import

* Fix pylint

* Restore coverage in discovery.py
2023-02-22 11:24:21 -05:00

28 lines
732 B
Python

"""Test fixtures for the Thread integration."""
import pytest
from homeassistant.components import thread
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
CONFIG_ENTRY_DATA = {}
@pytest.fixture(name="thread_config_entry")
async def thread_config_entry_fixture(hass: HomeAssistant):
"""Mock Thread config entry."""
config_entry = MockConfigEntry(
data=CONFIG_ENTRY_DATA,
domain=thread.DOMAIN,
options={},
title="Thread",
)
config_entry.add_to_hass(hass)
assert await hass.config_entries.async_setup(config_entry.entry_id)
@pytest.fixture(autouse=True)
def use_mocked_zeroconf(mock_async_zeroconf):
"""Mock zeroconf in all tests."""