aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for preserving formatting in code blocksDavid Vo2019-01-251-0/+13
|
* Add tests for no formatting casesDavid Vo2019-01-251-0/+14
|
* Add apostrophe to the regex with a corresponding testPásztor János2018-11-121-0/+8
| | | | * fixes #618
* 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.
* Match nicks with parenthesis and/or unicode (#649)pasja2018-11-031-0/+37
| | | | | | | | * Fix for #570, also incorporates #545 * Fixes from the review * review fix #2
* Fix test_everything.py failing by handling events in orderEric Wang2018-10-201-1/+1
|
* Merge pull request #462 from ericdwang/shared-channelsTrygve Aaberge2018-06-271-0/+8
|\ | | | | Add support for shared channels
| * Add support for shared channelsEric Wang2018-06-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since shared channels only work with the new conversations API, a new class of SlackChannel and API type were added to support them. Also `rtm.start` doesn't include external users so their information needs to be fetched individually when getting the channel history. To distinguish external users from team members their nicks get appended with an asterisk, which can be changed with a new setting. They also appear in a new "External" group in the nicklist since their presences can't be fetched with `users.getPresence`. Unfortunately `conversations.history` doesn't include thread messages so threads won't show up in shared channels.
* | Don't raise exception on missing event callbacks (#589)Trygve Aaberge2018-06-113-71/+13
| | | | | | | | | | These missing callbacks are not really errors or exceptions, and we don't need to implement all of them. Raising an exception makes the users think something isn't working, and is confusing.
* | 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
* Re-add support for weechat.look.nick_{prefix,suffix}Tollef Fog Heen2018-03-111-0/+4
| | | | Fixes: #428
* Merge pull request #444 from trygveaa/feat/unfurl-prevent-auto-linkingTrygve Aaberge2018-01-141-1/+24
|\ | | | | feat: Remove Slacks auto prefixing of url protocols
| * test: Add tests for unfurl_auto_link_displayTrygve Aaberge2017-10-011-1/+24
| |
* | Merge pull request #438 from trygveaa/attachment-tests-and-minor-fixesTrygve Aaberge2018-01-101-0/+150
|\ \ | | | | | | Attachment tests and minor fixes
| * | 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
| |/
* | Create a decorator for decoding function argumentsTrygve Aaberge2017-10-191-0/+13
| |
* | Add tests for decode_from_utf8/encode_to_utf8Trygve Aaberge2017-10-191-0/+59
| |
* | test: Add tests for topic_command_cbTrygve Aaberge2017-10-081-1/+53
| |
* | 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.
* | refactor: Split topic_command_cb and add testsTrygve Aaberge2017-10-081-0/+44
|/ | | | | | Split out the parts of topic_command_cb that's most interesting and easiest to test into parse_topic_command and add tests for that function.
* Merge pull request #434 from trygveaa/test/fix-broken-testsTollef Fog Heen2017-09-188-9/+10
|\ | | | | Fix broken tests
| * test: Remove monkeypatch dependencyTrygve Aaberge2017-09-156-6/+6
| | | | | | | | As far as I can see, this isn't used anywhere.
| * test: Fix two incorrect test namesTrygve Aaberge2017-09-152-2/+2
| |
| * 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-152-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #401 from ToxicFrog/toxicfrog/unfurlTrygve Aaberge2017-09-171-19/+17
|\ \ | |/ |/| Fix overzealous regex in unfurl_refs
| * 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
| |
* | Fix HTML entity-encoding of outgoing messagesTrygve Aaberge2017-08-011-0/+9
|/ | | | | | We have to replace the & before we replace < and >, otherwise the & in &lt; and &gt; are going to be replaced. Additionally, we need to end the sequences with ; which was missing.
* 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-12146-108/+1514
|
* 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
|
* Fix up pytestTollef Fog Heen2015-12-211-0/+1
|
* unicode fixes, change variable names, better testsRyan Huber2015-11-167-7/+10
|
* 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.
* Whitespace cleanupTollef Fog Heen2015-08-291-5/+0
|
* 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-186-0/+188