Use Object selector for AndroidTV detection rules option (#84412)

This commit is contained in:
ollo69
2022-12-27 15:08:23 +01:00
committed by GitHub
parent 4c8e3aa7c4
commit 5058272818
2 changed files with 13 additions and 18 deletions

View File

@@ -1,5 +1,4 @@
"""Tests for the AndroidTV config flow."""
import json
from unittest.mock import patch
import pytest
@@ -410,7 +409,7 @@ async def test_options_flow(hass):
result = await hass.config_entries.options.async_configure(
result["flow_id"],
user_input={
CONF_RULE_VALUES: json.dumps({"a": "b"}),
CONF_RULE_VALUES: {"a": "b"},
},
)
assert result["type"] == data_entry_flow.FlowResultType.FORM
@@ -421,7 +420,7 @@ async def test_options_flow(hass):
result = await hass.config_entries.options.async_configure(
result["flow_id"],
user_input={
CONF_RULE_VALUES: json.dumps(["standby"]),
CONF_RULE_VALUES: ["standby"],
},
)
assert result["type"] == data_entry_flow.FlowResultType.FORM
@@ -442,7 +441,7 @@ async def test_options_flow(hass):
result["flow_id"],
user_input={
CONF_RULE_ID: "rule2",
CONF_RULE_VALUES: json.dumps(VALID_DETECT_RULE),
CONF_RULE_VALUES: VALID_DETECT_RULE,
},
)
assert result["type"] == data_entry_flow.FlowResultType.FORM