Fix flaky tests around frame helper (#61179)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet
2021-12-08 10:50:56 +01:00
committed by GitHub
parent 9a46e802b7
commit 9f15e7dcf4
2 changed files with 4 additions and 0 deletions

View File

@@ -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(

View File

@@ -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(