From 44d7169642309e600b88ed64d6a7de3dad31e10a Mon Sep 17 00:00:00 2001 From: jjlawren Date: Tue, 2 Jun 2020 17:37:10 -0500 Subject: [PATCH] Fix flaky Plex test (#36391) --- tests/components/plex/test_config_flow.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/components/plex/test_config_flow.py b/tests/components/plex/test_config_flow.py index b43448b4d97..0b0ff2a2711 100644 --- a/tests/components/plex/test_config_flow.py +++ b/tests/components/plex/test_config_flow.py @@ -576,6 +576,8 @@ async def test_manual_config(hass): config_flow.DOMAIN, context={"source": "user"} ) + assert result["type"] == "form" + assert result["step_id"] == "user" assert result["data_schema"] is None hass.config_entries.flow.async_abort(result["flow_id"]) @@ -588,9 +590,10 @@ async def test_manual_config(hass): assert result["type"] == "form" assert result["step_id"] == "user_advanced" - result = await hass.config_entries.flow.async_configure( - result["flow_id"], user_input={"setup_method": AUTOMATIC_SETUP_STRING} - ) + with patch("plexauth.PlexAuth.initiate_auth"): + result = await hass.config_entries.flow.async_configure( + result["flow_id"], user_input={"setup_method": AUTOMATIC_SETUP_STRING} + ) assert result["type"] == "external" hass.config_entries.flow.async_abort(result["flow_id"])