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