mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 06:20:07 +00:00
Add uid attribute to imap_content event data (#114432)
* Add uid to imap event * Add ´uid´ to tests * Update test_init.py
This commit is contained in:
@@ -164,6 +164,7 @@ async def test_receiving_message_successfully(
|
||||
assert data["folder"] == "INBOX"
|
||||
assert data["sender"] == "john.doe@example.com"
|
||||
assert data["subject"] == "Test subject"
|
||||
assert data["uid"] == "1"
|
||||
assert "Test body" in data["text"]
|
||||
assert (
|
||||
valid_date
|
||||
@@ -213,6 +214,7 @@ async def test_receiving_message_with_invalid_encoding(
|
||||
assert data["sender"] == "john.doe@example.com"
|
||||
assert data["subject"] == "Test subject"
|
||||
assert data["text"] == TEST_BADLY_ENCODED_CONTENT
|
||||
assert data["uid"] == "1"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("imap_search", [TEST_SEARCH_RESPONSE])
|
||||
@@ -251,6 +253,7 @@ async def test_receiving_message_no_subject_to_from(
|
||||
assert data["text"] == "Test body\r\n"
|
||||
assert data["headers"]["Return-Path"] == ("<john.doe@example.com>",)
|
||||
assert data["headers"]["Delivered-To"] == ("notify@example.com",)
|
||||
assert data["uid"] == "1"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("imap_has_capability", [True, False], ids=["push", "poll"])
|
||||
|
||||
Reference in New Issue
Block a user