* Add config flow to gogogate2 component. * Using a more stable gogogate api. * Getting config flows working better by using different downstream library. * Fixing options not getting default values. Adding availability to cover entity. * Simplifying return types of function. * Address PR feedback. * Making user config flow not abort. * Using DataUpdateCoordinator. * Addressing PR feedback. * Using standard method for using hass.data * Split auth fail test into separate tests.
18 lines
442 B
Python
18 lines
442 B
Python
"""Fixtures for tests."""
|
|
|
|
from mock import patch
|
|
import pytest
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .common import ComponentFactory
|
|
|
|
|
|
@pytest.fixture()
|
|
def component_factory(hass: HomeAssistant):
|
|
"""Return a factory for initializing the gogogate2 api."""
|
|
with patch(
|
|
"homeassistant.components.gogogate2.common.GogoGate2Api"
|
|
) as gogogate2_api_mock:
|
|
yield ComponentFactory(hass, gogogate2_api_mock)
|