aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_unwrap_attachments.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2017-10-14 10:03:50 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2017-10-15 22:05:55 +0200
commit867d6134f9ef0d66deb5f5b4da63d5d5a538810a (patch)
treefc3be80464694471e2115cc3ab1df8b178bed56b /_pytest/test_unwrap_attachments.py
parentdb6b99fc17a1e37564723452963246a9e7a2b787 (diff)
downloadwee-slack-867d6134f9ef0d66deb5f5b4da63d5d5a538810a.tar.gz
fix: Unescape html before checking attachment links
The title and from_url fields of attachments doesn't seem to be escaped, so the check if they already are in the text didn't work if the link contained e.g. an ampersand.
Diffstat (limited to '_pytest/test_unwrap_attachments.py')
-rw-r--r--_pytest/test_unwrap_attachments.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/_pytest/test_unwrap_attachments.py b/_pytest/test_unwrap_attachments.py
index 8e41662..ee5bd8b 100644
--- a/_pytest/test_unwrap_attachments.py
+++ b/_pytest/test_unwrap_attachments.py
@@ -32,10 +32,10 @@ import pytest
'input_message': {'attachments': [{
'title': 'Title',
'text': 'Attachment text',
- 'title_link': 'http://link',
- 'from_url': 'http://link',
+ 'title_link': 'http://link?a=1&b=2',
+ 'from_url': 'http://link?a=1&b=2',
}]},
- 'input_text_before': "http://link",
+ 'input_text_before': "http://link?a=1&amp;b=2",
'output': "\n".join([
"",
"Title",