From 9cd9d06bccfd3e73ec989ba2692229c129507914 Mon Sep 17 00:00:00 2001 From: jjlawren Date: Fri, 27 May 2022 02:46:22 -0500 Subject: [PATCH] Avoid network activity during Plex tests (#72499) --- tests/components/plex/test_config_flow.py | 6 ++++++ tests/components/plex/test_init.py | 1 + 2 files changed, 7 insertions(+) diff --git a/tests/components/plex/test_config_flow.py b/tests/components/plex/test_config_flow.py index c22890ebef3..f02abd834d7 100644 --- a/tests/components/plex/test_config_flow.py +++ b/tests/components/plex/test_config_flow.py @@ -193,6 +193,8 @@ async def test_single_available_server( ) assert result["data"][PLEX_SERVER_CONFIG][CONF_TOKEN] == MOCK_TOKEN + await hass.config_entries.async_unload(result["result"].entry_id) + async def test_multiple_servers_with_selection( hass, @@ -249,6 +251,8 @@ async def test_multiple_servers_with_selection( ) assert result["data"][PLEX_SERVER_CONFIG][CONF_TOKEN] == MOCK_TOKEN + await hass.config_entries.async_unload(result["result"].entry_id) + async def test_adding_last_unconfigured_server( hass, @@ -305,6 +309,8 @@ async def test_adding_last_unconfigured_server( ) assert result["data"][PLEX_SERVER_CONFIG][CONF_TOKEN] == MOCK_TOKEN + await hass.config_entries.async_unload(result["result"].entry_id) + async def test_all_available_servers_configured( hass, diff --git a/tests/components/plex/test_init.py b/tests/components/plex/test_init.py index bbab50a7bbb..94278ca6052 100644 --- a/tests/components/plex/test_init.py +++ b/tests/components/plex/test_init.py @@ -184,6 +184,7 @@ async def test_setup_when_certificate_changed( plextv_account, plextv_resources, plextv_shared_users, + mock_websocket, ): """Test setup component when the Plex certificate has changed."""