aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_unwrap_attachments.py
Commit message (Collapse)AuthorAgeFilesLines
* Properly fix rendering of < and >Trygve Aaberge2023-10-181-22/+104
| | | | | | | | I tried to do a fix for this in commit 6478c141, but it only fixed normal text, not e.g. code blocks and attachments. With this I think it should be correct everywhere. Fixes #908
* Show useful link for Slack postsTrygve Aaberge2022-10-301-4/+4
| | | | | | | | | | | | | The url_private link for Slack posts just downloads a json of the post, which isn't very useful to click on. The permalink goes to the web view for a post, which is what we want. The web client adds origin_team and origin_channel, which makes the post page show info about where the post is shared, so add that here as well. We still want to use url_private for images etc., not permalink there as well, because that links to the Slack client with the image shown in the sidebar, which is much more inconvenient than just getting the image directly.
* Format all python files with blackTrygve Aaberge2021-03-201-317/+462
|
* Add tests for link_previous option added in previous commitTrygve Aaberge2021-02-221-0/+31
|
* Support colorizing attachment prefix or lineTrygve Aaberge2020-06-161-0/+20
| | | | | | | | | Thanks to @Informatic for the initial implementation of this in PR #426. I have seen that most attachment colors are without the leading #, but a few does include it, so we have to handle it. Fixes #424, closes #426
* Include a prefix character in front of attachmentsTrygve Aaberge2020-06-141-42/+43
|
* Show a colon between attachment fields title and valueTrygve Aaberge2020-05-251-1/+1
|
* Include files in attachmentsTrygve Aaberge2020-04-051-0/+16
|
* Include footer in attachmentsTrygve Aaberge2020-04-051-0/+35
|
* Don't add fallback if link exists in text_beforeTrygve Aaberge2020-04-051-0/+24
| | | | | | | | We should only use the fallback if we don't get any information out of the attachment. For links that exists in text_before, we have gotten the information from the attachment, but choose not to display it so we don't end up with duplicate links. Therefore, we shouldn't use the fallback in this case.
* Match attachment links against escaped text as wellTrygve Aaberge2020-04-051-0/+15
| | | | | The urls in the attachment fields can apparently come both escaped and unescaped.
* Don't print image_url if it's equal to from_urlTrygve Aaberge2020-04-051-0/+16
|
* Import print_function and unicode_literals in all test filesTrygve Aaberge2019-04-081-0/+2
|
* print `image_url` if it exists (#504)Charlie Allom2018-06-081-0/+15
| | | | | | | | | | | | | | | | | | | | * print `image_url` if it exists * add test for image_url * requirements.txt for pytest * fix requirements.txt * text before image_url * this isn’t required * README readability for development section thanks @trygveaa * README reorder for this development section
* fix: Unescape html before checking attachment linksTrygve Aaberge2017-10-151-3/+3
| | | | | | 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.
* Add a newline between attachmentsTrygve Aaberge2017-09-201-0/+22
|
* Don't render equal title_link and from_url in attachments twiceTrygve Aaberge2017-09-201-0/+13
| | | | | | | This is a follow-up of commit 0345ba1. That prevented rendering the link if it already was in the text. This prevents rendering both the title_link and from_url if they are equal, but not in the text. In this case it only renders the title_link.
* test: Add tests for unwrap_attachmentsTrygve Aaberge2017-09-201-0/+115