mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 03:08:01 +02:00
Use string type for amazon devices OTP code (#145698)
This commit is contained in:
committed by
Bram Kragten
parent
2830ed6147
commit
9e7dc1d11d
@ -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(
|
||||||
|
Reference in New Issue
Block a user