aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_unwrap_attachments.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-03-26 21:53:35 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2020-04-05 20:22:46 +0200
commit2877fa65958921c4b8dcf6caef11c60083495574 (patch)
tree69995c2fbd2ec5114a7db07d4193a6d6d7973c17 /_pytest/test_unwrap_attachments.py
parent5dfba738a85d3065de0275ae3a0ed607d1fe3788 (diff)
downloadwee-slack-2877fa65958921c4b8dcf6caef11c60083495574.tar.gz
Don't print image_url if it's equal to from_url
Diffstat (limited to '_pytest/test_unwrap_attachments.py')
-rw-r--r--_pytest/test_unwrap_attachments.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/_pytest/test_unwrap_attachments.py b/_pytest/test_unwrap_attachments.py
index 89436af..ab2172a 100644
--- a/_pytest/test_unwrap_attachments.py
+++ b/_pytest/test_unwrap_attachments.py
@@ -51,6 +51,7 @@ import pytest
'text': 'Attachment text',
'title_link': 'http://link?a=1&b=2',
'from_url': 'http://link?a=1&b=2',
+ 'image_url': 'http://link?a=1&b=2',
}]},
'input_text_before': "http://link?a=1&amp;b=2",
'output': "\n".join([
@@ -65,6 +66,7 @@ import pytest
'text': 'Attachment text',
'title_link': 'http://link',
'from_url': 'http://link',
+ 'image_url': 'http://link',
}]},
'input_text_before': "",
'output': "\n".join([
@@ -75,6 +77,20 @@ import pytest
{
'input_message': {'attachments': [{
'title': 'Title',
+ 'text': 'Attachment text',
+ 'from_url': 'http://link',
+ 'image_url': 'http://link',
+ }]},
+ 'input_text_before': "",
+ 'output': "\n".join([
+ "Title",
+ "http://link",
+ "Attachment text",
+ ]),
+ },
+ {
+ 'input_message': {'attachments': [{
+ 'title': 'Title',
'text': 'Attachment text\n\n\nWith multiple lines',
}]},
'input_text_before': "",