mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add longer text strings to mailbox demo to test string truncation (#8893)
* Add longer text strings to mailbox demo to test string truncation in frontend * Remove lorem ipsum txt file * Use format instead of %
This commit is contained in:
committed by
Pascal Vizeli
parent
af70054692
commit
19ee3c42b6
@@ -47,7 +47,8 @@ def test_get_messages_from_mailbox(mock_http_client):
|
||||
def test_get_media_from_mailbox(mock_http_client):
|
||||
"""Get audio from mailbox."""
|
||||
mp3sha = "3f67c4ea33b37d1710f772a26dd3fb43bb159d50"
|
||||
msgtxt = "This is recorded message # 1"
|
||||
msgtxt = ("Message 1. "
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. ")
|
||||
msgsha = sha1(msgtxt.encode('utf-8')).hexdigest()
|
||||
|
||||
url = "/api/mailbox/media/DemoMailbox/%s" % (msgsha)
|
||||
@@ -60,8 +61,10 @@ def test_get_media_from_mailbox(mock_http_client):
|
||||
@asyncio.coroutine
|
||||
def test_delete_from_mailbox(mock_http_client):
|
||||
"""Get audio from mailbox."""
|
||||
msgtxt1 = "This is recorded message # 1"
|
||||
msgtxt2 = "This is recorded message # 2"
|
||||
msgtxt1 = ("Message 1. "
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. ")
|
||||
msgtxt2 = ("Message 3. "
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. ")
|
||||
msgsha1 = sha1(msgtxt1.encode('utf-8')).hexdigest()
|
||||
msgsha2 = sha1(msgtxt2.encode('utf-8')).hexdigest()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user