aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_unfurl.py
Commit message (Collapse)AuthorAgeFilesLines
* Format all python files with blackTrygve Aaberge2021-03-201-159/+166
|
* Set time zone to UTC for unfurl test (#782)Tollef Fog Heen2020-07-041-0/+2
| | | Fixes #781
* Ignore ref fallback if it's equal to the refTrygve Aaberge2020-04-051-0/+5
| | | | | Prevents showing "http://some.url (http://some.url)" if the url has a fallback which is equal to the url.
* Add tests for unfurl_auto_link_display with mailtoTrygve Aaberge2020-04-051-0/+15
|
* Fix tests for python 2Trygve Aaberge2020-02-211-3/+4
|
* Make tests work when the timezone is set to UTCTrygve Aaberge2020-02-211-7/+11
| | | | | | | | | | Unfortunately, the date tests of the last commit only work in one time zone. This changes them to work in UTC. If your machine doesn't use UTC, you now have to run the tests like this: TZ=UTC pytest I'm not sure what the best way to avoid requiring this is.
* Support parsing date refsTrygve Aaberge2020-02-211-3/+31
|
* Support unfurling date refs by using the fallbackTrygve Aaberge2020-02-201-0/+4
|
* Only use fallback for refs if ref is not foundTrygve Aaberge2020-02-201-7/+27
| | | | | | Fallbacks in messages are not changed when channels/users/groups are renamed, so they shouldn't be used unless the ref can't be found. Links are not refs we look up, so they are still treated the same way.
* Remove ignore_alt_text parameter from unfurl_refsTrygve Aaberge2020-02-201-4/+2
| | | | | This is only used in tests and in render_topic, and I don't see why render_topic shouldn't follow the global config that is set.
* Remove auto_link_display parameter from unfurl_refsTrygve Aaberge2020-02-201-2/+2
| | | | | This is only used in tests, and there we can override the config instead.
* Render group notifications with @ instead of !Trygve Aaberge2019-08-251-0/+16
| | | | | | | | | This is for the notifications @channel, @everyone, @group and @here. @group isn't mentioned in the documentation[0], but it is still rendered as a highlight in the web client, so I included it. [0]: https://get.slack.help/hc/en-us/articles/202009646-Notify-a-channel-or-workspace
* Cleanup tests and make them compatible with python 3Trygve Aaberge2019-04-081-4/+2
| | | | | | This mainly adds team, channel_general and user_alice as fixtures, so we can use those directly instead of picking arbitrary ones from the lists. It also adds assertions to some tests which where missing it.
* Import print_function and unicode_literals in all test filesTrygve Aaberge2019-04-081-0/+2
|
* Add @user-groups support (#680)Nana Amfo2019-04-081-0/+4
| | | Add @user-groups with tab-completion. @user-groups will be unfurl into format <!subteam^{ID}|handle> message before sending message via linktext method.
* test: Add tests for unfurl_auto_link_displayTrygve Aaberge2017-10-011-1/+24
|
* test: Add a unfurl test case for messages containing >Trygve Aaberge2017-09-171-0/+4
| | | | | | This tests the bug that was fixed in commit c667bf6, where a message that first has an url and then a > character would try to unfurl everything up to the last >.
* test: Fix and enable the tests for unfurl_refsTrygve Aaberge2017-09-171-19/+13
|
* massssssssive merge of the new codebaseRyan Huber2017-04-121-9/+16
|
* Leverage pytest.parametrize for test_unfurlMatt Robenolt2016-11-071-26/+27
| | | | | This provides nicer granular test cases rather than one whole test that fails.
* Test string with multiple unfurlcalve2016-01-041-0/+3
|
* unicode fixes, change variable names, better testsRyan Huber2015-11-161-2/+2
|
* Handle unfurling of things with no alt text correctly as wellTollef Fog Heen2015-08-291-0/+3
|
* Whitespace fixupsTollef Fog Heen2015-08-291-2/+0
|
* Refactor unfurl_refsTollef Fog Heen2015-08-291-0/+3
| | | | | Instead of blindly splitting on spaces, use something approximating a parser for parsing refs. Also add another test case.
* Add unit test for unfurl_refs and correct logicTollef Fog Heen2015-08-291-0/+38
The logic for showing/ignoring alt refs was wrong. Fix that, and to prevent this from showing up again, add a unit test.