hass-core/tests/components/tradfri/conftest.py

21 lines
510 B
Python
Raw Normal View History

"""Common tradfri test fixtures."""
2020-04-25 14:32:55 -07:00
from asynctest import patch
import pytest
@pytest.fixture
def mock_gateway_info():
"""Mock get_gateway_info."""
2019-07-31 12:25:30 -07:00
with patch(
"homeassistant.components.tradfri.config_flow.get_gateway_info"
2019-07-31 12:25:30 -07:00
) as mock_gateway:
yield mock_gateway
@pytest.fixture
def mock_entry_setup():
"""Mock entry setup."""
with patch("homeassistant.components.tradfri.async_setup_entry") as mock_setup:
2020-04-25 14:32:55 -07:00
mock_setup.return_value = True
yield mock_setup