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:
Jan Bouwhuis 2023-09-12 18:54:32 +02:00 committed by GitHub
parent 86bccf769e
commit e84a4661b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 15 deletions

View file

@ -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"],
)