From 13a8822fb1a9aa199d0119628fc31b4a364e1636 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 13 Apr 2024 11:46:40 +0100 Subject: [PATCH] Revert "Add options flow test" This reverts commit 33b0eae4956cb3c797db79a259b333c098b81fa1. --- tests/test_config_flow.py | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index 040a4f5..8a0b095 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -1,9 +1,11 @@ """Tests for the config flow.""" from unittest import mock +from homeassistant.const import CONF_ACCESS_TOKEN, CONF_NAME, CONF_PATH +import pytest from pytest_homeassistant_custom_component.common import MockConfigEntry from custom_components.ohme import config_flow -from homeassistant.helpers import config_entry_flow +from custom_components.ohme.const import DOMAIN async def test_step_account(hass): """Test the initialization of the form in the first step of the config flow.""" @@ -24,35 +26,3 @@ async def test_step_account(hass): } assert expected == result - -async def test_options_flow(hass): - """Test the options flow.""" - entry = MockConfigEntry(domain=config_flow.DOMAIN) - entry.add_to_hass(hass) - - flow = config_flow.OhmeOptionsFlow(entry) - result = await config_entry_flow.async_init( - hass, flow, context={"source": "test"}, data={} - ) - - assert result["type"] == "form" - assert result["step_id"] == "init" - assert result["data_schema"] is not None - - result = await config_entry_flow.async_configure( - hass, - flow, - result["step_id"], - { - "email": "test@example.com", - "password": "password123", - "never_session_specific": True, - "enable_accumulative_energy": False, - }, - ) - - assert result["type"] == "create_entry" - assert result["data"] == { - "never_session_specific": True, - "enable_accumulative_energy": False, - } \ No newline at end of file