Setup recorder model relationships to avoid calling flush (#40467)
This commit is contained in:
1 parent
aada6a1d88
commit
d9ba32dc3f
4 files changed
+64
-46
No files matched your search
@@ -181,7 +181,20 @@ def test_saving_state_incl_entities(hass_recorder):
|
||||
|
||||
def test_saving_event_exclude_event_type(hass_recorder):
|
||||
"""Test saving and restoring an event."""
|
||||
hass = hass_recorder({"exclude": {"event_types": "test"}})
|
||||
hass = hass_recorder(
|
||||
{
|
||||
"exclude": {
|
||||
"event_types": [
|
||||
"service_registered",
|
||||
"homeassistant_start",
|
||||
"component_loaded",
|
||||
"core_config_updated",
|
||||
"homeassistant_started",
|
||||
"test",
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
events = _add_events(hass, ["test", "test2"])
|
||||
assert len(events) == 1
|
||||
assert events[0].event_type == "test2"
|
||||
|
||||
Reference in new issue
Block a user