Tweak multiprotocol tests (#90163)
This commit is contained in:
parent
4c26741e40
commit
50ea0c5cf2
1 changed files with 6 additions and 6 deletions
|
@ -25,7 +25,7 @@ from tests.common import (
|
||||||
TEST_DOMAIN = "test"
|
TEST_DOMAIN = "test"
|
||||||
|
|
||||||
|
|
||||||
class TestConfigFlow(ConfigFlow):
|
class FakeConfigFlow(ConfigFlow):
|
||||||
"""Handle a config flow for the silabs multiprotocol add-on."""
|
"""Handle a config flow for the silabs multiprotocol add-on."""
|
||||||
|
|
||||||
VERSION = 1
|
VERSION = 1
|
||||||
|
@ -34,9 +34,9 @@ class TestConfigFlow(ConfigFlow):
|
||||||
@callback
|
@callback
|
||||||
def async_get_options_flow(
|
def async_get_options_flow(
|
||||||
config_entry: ConfigEntry,
|
config_entry: ConfigEntry,
|
||||||
) -> TestOptionsFlow:
|
) -> FakeOptionsFlow:
|
||||||
"""Return the options flow."""
|
"""Return the options flow."""
|
||||||
return TestOptionsFlow(config_entry)
|
return FakeOptionsFlow(config_entry)
|
||||||
|
|
||||||
async def async_step_system(self, data: dict[str, Any] | None = None) -> FlowResult:
|
async def async_step_system(self, data: dict[str, Any] | None = None) -> FlowResult:
|
||||||
"""Handle the initial step."""
|
"""Handle the initial step."""
|
||||||
|
@ -46,7 +46,7 @@ class TestConfigFlow(ConfigFlow):
|
||||||
return self.async_create_entry(title="Test HW", data={})
|
return self.async_create_entry(title="Test HW", data={})
|
||||||
|
|
||||||
|
|
||||||
class TestOptionsFlow(silabs_multiprotocol_addon.OptionsFlowHandler):
|
class FakeOptionsFlow(silabs_multiprotocol_addon.OptionsFlowHandler):
|
||||||
"""Handle an option flow for the silabs multiprotocol add-on."""
|
"""Handle an option flow for the silabs multiprotocol add-on."""
|
||||||
|
|
||||||
async def _async_serial_port_settings(
|
async def _async_serial_port_settings(
|
||||||
|
@ -89,10 +89,10 @@ class TestOptionsFlow(silabs_multiprotocol_addon.OptionsFlowHandler):
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def config_flow_handler(
|
def config_flow_handler(
|
||||||
hass: HomeAssistant, current_request_with_host: Any
|
hass: HomeAssistant, current_request_with_host: Any
|
||||||
) -> Generator[TestConfigFlow, None, None]:
|
) -> Generator[FakeConfigFlow, None, None]:
|
||||||
"""Fixture for a test config flow."""
|
"""Fixture for a test config flow."""
|
||||||
mock_platform(hass, f"{TEST_DOMAIN}.config_flow")
|
mock_platform(hass, f"{TEST_DOMAIN}.config_flow")
|
||||||
with mock_config_flow(TEST_DOMAIN, TestConfigFlow):
|
with mock_config_flow(TEST_DOMAIN, FakeConfigFlow):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue