core/tests/components/vera/conftest.py

16 lines
434 B
Python
Raw Normal View History

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