"""Tests for the config flow.""" from unittest.mock import ANY, AsyncMock, MagicMock, patch import pytest import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_NAME from homeassistant.data_entry_flow import FlowResultType from pytest_homeassistant_custom_component.common import MockConfigEntry from custom_components.tuya_local import ( async_migrate_entry, config_flow, ) from custom_components.tuya_local.const import ( CONF_DEVICE_CID, CONF_DEVICE_ID, CONF_LOCAL_KEY, CONF_POLL_ONLY, CONF_PROTOCOL_VERSION, CONF_TYPE, DOMAIN, ) # Designed to contain "special" characters that users constantly suspect. TESTKEY = ")