mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Add intial property to imap_content event data (#100171)
* Add initial property to imap event data * Simplify loop Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * MyPy --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
@@ -512,6 +512,7 @@ async def test_reset_last_message(
|
||||
assert data["sender"] == "john.doe@example.com"
|
||||
assert data["subject"] == "Test subject"
|
||||
assert data["text"]
|
||||
assert data["initial"]
|
||||
assert (
|
||||
valid_date
|
||||
and isinstance(data["date"], datetime)
|
||||
@@ -628,7 +629,7 @@ async def test_message_is_truncated(
|
||||
[
|
||||
("{{ subject }}", "Test subject", None),
|
||||
('{{ "@example.com" in sender }}', True, None),
|
||||
("{% bad template }}", None, "Error rendering imap custom template"),
|
||||
("{% bad template }}", None, "Error rendering IMAP custom template"),
|
||||
],
|
||||
ids=["subject_test", "sender_filter", "template_error"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user