mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use string type for amazon devices OTP code (#145698)
This commit is contained in:
parent
8364d8a2e3
commit
2189dc3e2a
@ -57,7 +57,7 @@ class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
): CountrySelector(),
|
): CountrySelector(),
|
||||||
vol.Required(CONF_USERNAME): cv.string,
|
vol.Required(CONF_USERNAME): cv.string,
|
||||||
vol.Required(CONF_PASSWORD): cv.string,
|
vol.Required(CONF_PASSWORD): cv.string,
|
||||||
vol.Required(CONF_CODE): cv.positive_int,
|
vol.Required(CONF_CODE): cv.string,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"""Amazon Devices tests const."""
|
"""Amazon Devices tests const."""
|
||||||
|
|
||||||
TEST_CODE = 123123
|
TEST_CODE = "023123"
|
||||||
TEST_COUNTRY = "IT"
|
TEST_COUNTRY = "IT"
|
||||||
TEST_PASSWORD = "fake_password"
|
TEST_PASSWORD = "fake_password"
|
||||||
TEST_SERIAL_NUMBER = "echo_test_serial_number"
|
TEST_SERIAL_NUMBER = "echo_test_serial_number"
|
||||||
|
@ -56,6 +56,7 @@ async def test_full_flow(
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
assert result["result"].unique_id == TEST_USERNAME
|
assert result["result"].unique_id == TEST_USERNAME
|
||||||
|
mock_amazon_devices_client.login_mode_interactive.assert_called_once_with("023123")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user