mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add and restore context in recorder (#15859)
This commit is contained in:
@@ -246,8 +246,9 @@ class TestEvent(unittest.TestCase):
|
||||
"""Test events."""
|
||||
now = dt_util.utcnow()
|
||||
data = {'some': 'attr'}
|
||||
context = ha.Context()
|
||||
event1, event2 = [
|
||||
ha.Event('some_type', data, time_fired=now)
|
||||
ha.Event('some_type', data, time_fired=now, context=context)
|
||||
for _ in range(2)
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user