aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* Make render_emoji_as_string = "both" work with rich_text blocks (#902)melanie witt2023-09-221-0/+2
| | | | | | | | | | | | | | | | | | | Commit 74da30342e8d328fc085d2158e37afda3b908f2c added support for using rich_text blocks to format messages. With this change, the use of replace_string_with_emoji() for text type "emoji" can result in running the replacement twice as replace_string_with_emoji() is also called as one of the last steps in SlackMessage.render(). This works fine in the default case when render_emoji_as_string = "", however render_emoji_as_string = "both" results in output like: πŸ˜„ (πŸ˜„ (:smile:)) instead of the intended: πŸ˜„ (:smile:) This excludes blocks rendered earlier in the method from the second call of replace_string_with_emoji().
* Support retrying requests when ratelimitedTrygve Aaberge2022-09-181-1/+2
|
* Support starting wee-slack without using rtm.startTrygve Aaberge2022-09-171-2/+2
| | | | | | | | | | | rtm.start is deprecated and will stop working on September 20, 2022. This patch replaces it with several other API endpoints to get the info we need. The handle_rtmstart method is kept for the test setup to work, but this setup should also be replaced with the new API endpoints. This is a necessary step for #699 and #844
* Ignore failing flake rules instead of selecting only a fewTrygve Aaberge2021-04-131-2/+2
| | | | E203 should be ignored when using black according to their docs.
* Fix some flake8 errorsTrygve Aaberge2021-04-131-1/+1
|
* Some code cleanup from lgtm.com checksTrygve Aaberge2021-04-121-1/+1
|
* Format all python files with blackTrygve Aaberge2021-03-201-12/+46
|
* Support colorizing attachment prefix or lineTrygve Aaberge2020-06-161-0/+5
| | | | | | | | | 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
* Assert color values in testsTrygve Aaberge2020-06-141-1/+1
|
* Store message ts in line tags instead of misusing date_printedTrygve Aaberge2020-06-071-0/+2
| | | | Fixes #514
* Use max_buffer_lines_number instead of hard codingTrygve Aaberge2020-06-041-0/+2
|
* Load new history after reconnect immediately when ↡Trygve Aaberge2020-05-301-2/+2
| | | | | | background_load_all_history is set Fixes #629, fixes #715, closes #732
* Include team in SlackRequestTrygve Aaberge2020-02-231-1/+1
|
* Add some more tests for linkify_textTrygve Aaberge2019-08-251-0/+12
|
* Include channel prefix in key in get_channel_mapTrygve Aaberge2019-08-251-1/+1
| | | | Fixes #587
* Fix broken testsTrygve Aaberge2019-05-051-1/+6
| | | | | I forgot to make some required changes in the tests after commit f3d880e and commit 49d481c.
* Reconnect if no pong is received for 12 secondsTrygve Aaberge2019-04-231-2/+6
| | | | | | | 12 seconds is a bit more than twice the amount of time between the pings we send. Fixes #238, fixes #480, fixes #561
* Cleanup tests and make them compatible with python 3Trygve Aaberge2019-04-081-28/+27
| | | | | | 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.
* Remember plugin config values in FakeWeechatSamuel Holland2019-04-081-3/+4
| | | | | | PluginConfig uses round-tripping through wee_slack.w to coerce the its default values to the correct type. Without this, the normal getters fail, as '' cannot be converted to an integer/boolean.
* Use StringIO from ioTrygve Aaberge2019-04-081-0/+2
| | | | | This is compatible with python 3, which StringIO from StringIO or cStringIO is not.
* Import print_function and unicode_literals in all test filesTrygve Aaberge2019-04-081-1/+1
|
* Always use the print function from Python 3Samuel Holland2019-04-081-5/+7
| | | | Comments are updated as well as live code.
* Store hdata structure in a classTrygve Aaberge2018-11-041-0/+1
| | | | Simplifies the usage so we don't have to look it up each time.
* Re-add support for weechat.look.nick_{prefix,suffix}Tollef Fog Heen2018-03-111-0/+4
| | | | Fixes: #428
* test: Map all weechat return codes in testsTrygve Aaberge2017-10-081-1/+3
| | | | | So we can assert on all of the return values. Since True == 1 in python, this doesn't change the value of WEECHAT_RC_OK.
* test: Empty eventrouter queue when initializing itTrygve Aaberge2017-09-151-1/+2
| | | | | | | The commit 6718e2f added some more events to the queue when a buffer is created. This made some tests fail as it would process these events instead of the ones added in the tests. Fix it by processing all events in the queue when setting up the eventrouter for the tests.
* test: Make mock_weechat a dependency of realish_eventrouterTrygve Aaberge2017-09-151-1/+1
| | | | | | | | | | Setting up the eventrouter for the tests involves code that requires the config object to be set, so it has to depend on mock_weechat. This didn't cause a problem when all the tests were run since the first test depends on mock_weechat so it would be set up. However, if you tried to run a single test that depended on realish_eventrouter, but not mock_weechat, it would fail.
* Fix the testsBen Kelly2017-07-121-0/+5
| | | | | | | | | | Not everything that needed to be mocked out was, and there was also an issue with every instance of PluginConfig sharing the same mutable settings field and thus stomping on each other if you initialized more than one in the same test. Signed-off-by: Ben Kelly <bk@ancilla.ca> Signed-off-by: Ben Kelly <btk@google.com>
* Handling incoming me_message subtypes.Ben Kelly2017-04-131-0/+2
| | | | Signed-off-by: Ben Kelly <btk@google.com>
* massssssssive merge of the new codebaseRyan Huber2017-04-121-70/+51
|
* unicode fixes, change variable names, better testsRyan Huber2015-11-161-1/+2
|
* Make sure to import rootdir for pytestTollef Fog Heen2015-08-291-0/+4
|
* add some initial tests. messages need a lot of work..Ryan Huber2015-03-181-0/+104