diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-03-26 21:54:23 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-04-05 20:22:46 +0200 |
commit | 6d852774e39e9c548543bd986f440a33800523de (patch) | |
tree | 90f5449ff57c0fc944f766b4d65736e6e0f4f197 /_pytest/test_unwrap_attachments.py | |
parent | 2877fa65958921c4b8dcf6caef11c60083495574 (diff) | |
download | wee-slack-6d852774e39e9c548543bd986f440a33800523de.tar.gz |
Match attachment links against escaped text as well
The urls in the attachment fields can apparently come both escaped and
unescaped.
Diffstat (limited to '_pytest/test_unwrap_attachments.py')
-rw-r--r-- | _pytest/test_unwrap_attachments.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/_pytest/test_unwrap_attachments.py b/_pytest/test_unwrap_attachments.py index ab2172a..1c5fa86 100644 --- a/_pytest/test_unwrap_attachments.py +++ b/_pytest/test_unwrap_attachments.py @@ -64,6 +64,21 @@ import pytest 'input_message': {'attachments': [{ 'title': 'Title', '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&b=2", + 'output': "\n".join([ + "", + "Title", + "Attachment text", + ]), + }, + { + 'input_message': {'attachments': [{ + 'title': 'Title', + 'text': 'Attachment text', 'title_link': 'http://link', 'from_url': 'http://link', 'image_url': 'http://link', |