From 80a57f5118c56658e578dc8c978c01cef55d783e Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sun, 19 Sep 2021 10:18:45 +0200 Subject: [PATCH] Prevent 3rd party lib from opening sockets in smhi tests (#56335) --- tests/components/smhi/test_init.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/components/smhi/test_init.py b/tests/components/smhi/test_init.py index ab937d266a4..2cf54ba7533 100644 --- a/tests/components/smhi/test_init.py +++ b/tests/components/smhi/test_init.py @@ -26,8 +26,12 @@ async def test_setup_entry( assert state -async def test_remove_entry(hass: HomeAssistant) -> None: +async def test_remove_entry( + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, api_response: str +) -> None: """Test remove entry.""" + uri = APIURL_TEMPLATE.format(TEST_CONFIG["longitude"], TEST_CONFIG["latitude"]) + aioclient_mock.get(uri, text=api_response) entry = MockConfigEntry(domain=DOMAIN, data=TEST_CONFIG) entry.add_to_hass(hass)