diff --git a/tests/helpers/test_aiohttp_client.py b/tests/helpers/test_aiohttp_client.py index f68c7ba2181..bfd933a4afd 100644 --- a/tests/helpers/test_aiohttp_client.py +++ b/tests/helpers/test_aiohttp_client.py @@ -107,6 +107,7 @@ async def test_get_clientsession_patched_close(hass): assert mock_close.call_count == 0 +@patch("homeassistant.helpers.frame._REPORTED_INTEGRATIONS", set()) async def test_warning_close_session_integration(hass, caplog): """Test log warning message when closing the session from integration context.""" with patch( @@ -138,6 +139,7 @@ async def test_warning_close_session_integration(hass, caplog): ) in caplog.text +@patch("homeassistant.helpers.frame._REPORTED_INTEGRATIONS", set()) async def test_warning_close_session_custom(hass, caplog): """Test log warning message when closing the session from custom context.""" with patch( diff --git a/tests/helpers/test_httpx_client.py b/tests/helpers/test_httpx_client.py index a47463b6b98..cdb650f7686 100644 --- a/tests/helpers/test_httpx_client.py +++ b/tests/helpers/test_httpx_client.py @@ -93,6 +93,7 @@ async def test_get_async_client_context_manager(hass): assert mock_aclose.call_count == 0 +@patch("homeassistant.helpers.frame._REPORTED_INTEGRATIONS", set()) async def test_warning_close_session_integration(hass, caplog): """Test log warning message when closing the session from integration context.""" with patch( @@ -125,6 +126,7 @@ async def test_warning_close_session_integration(hass, caplog): ) in caplog.text +@patch("homeassistant.helpers.frame._REPORTED_INTEGRATIONS", set()) async def test_warning_close_session_custom(hass, caplog): """Test log warning message when closing the session from custom context.""" with patch(