2019-12-08 15:19:38 -08:00
|
|
|
"""Fixtures for tests."""
|
2021-01-01 22:31:56 +01:00
|
|
|
from unittest.mock import patch
|
|
|
|
|
2019-12-08 15:19:38 -08:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
from .common import ComponentFactory
|
|
|
|
|
2021-03-02 10:02:04 +02:00
|
|
|
from tests.components.light.conftest import mock_light_profiles # noqa: F401
|
2020-06-05 01:59:55 -07:00
|
|
|
|
2019-12-08 15:19:38 -08:00
|
|
|
|
2023-01-26 18:05:05 +01:00
|
|
|
@pytest.fixture
|
2019-12-08 15:19:38 -08:00
|
|
|
def vera_component_factory():
|
|
|
|
"""Return a factory for initializing the vera component."""
|
2020-04-03 00:49:50 -07:00
|
|
|
with patch("pyvera.VeraController") as vera_controller_class_mock:
|
|
|
|
yield ComponentFactory(vera_controller_class_mock)
|