diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2017-10-14 10:03:50 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2017-10-15 22:05:55 +0200 |
commit | 867d6134f9ef0d66deb5f5b4da63d5d5a538810a (patch) | |
tree | fc3be80464694471e2115cc3ab1df8b178bed56b /_pytest | |
parent | db6b99fc17a1e37564723452963246a9e7a2b787 (diff) | |
download | wee-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')
-rw-r--r-- | _pytest/test_unwrap_attachments.py | 6 |
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&b=2", 'output': "\n".join([ "", "Title", |