Remove context_recent_time property from entity base class (#105652)

This commit is contained in:
Erik Montnemery
2023-12-14 08:33:31 +01:00
committed by GitHub
parent aafdca88c9
commit 9020dbb093
4 changed files with 6 additions and 16 deletions

View File

@@ -664,10 +664,9 @@ async def test_set_context_expired(hass: HomeAssistant) -> None:
"""Test setting context."""
context = Context()
with patch.object(
entity.Entity, "context_recent_time", new_callable=PropertyMock
) as recent:
recent.return_value = timedelta(seconds=-5)
with patch(
"homeassistant.helpers.entity.CONTEXT_RECENT_TIME", timedelta(seconds=-5)
):
ent = entity.Entity()
ent.hass = hass
ent.entity_id = "hello.world"