Fix profiler object growth logging test (#69211)

This commit is contained in:
J. Nick Koston 2022-04-03 12:39:47 -06:00 committed by GitHub
parent b644e7ed0f
commit cf685ef651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,10 +94,11 @@ async def test_object_growth_logging(hass, caplog):
assert hass.services.has_service(DOMAIN, SERVICE_START_LOG_OBJECTS)
assert hass.services.has_service(DOMAIN, SERVICE_STOP_LOG_OBJECTS)
await hass.services.async_call(
DOMAIN, SERVICE_START_LOG_OBJECTS, {CONF_SCAN_INTERVAL: 10}
)
await hass.async_block_till_done()
with patch("homeassistant.components.profiler.objgraph.growth"):
await hass.services.async_call(
DOMAIN, SERVICE_START_LOG_OBJECTS, {CONF_SCAN_INTERVAL: 10}
)
await hass.async_block_till_done()
assert "Growth" in caplog.text
caplog.clear()