aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
...
| * | Include message counts in all channels (#2016)Gravatar ChrisJL2021-12-28-2/+41
| | | | | | | | | Co-authored-by: Xithrius <[email protected]>
| * | Merge branch 'main' into add-dm_sent-fieldGravatar Joe Banks2021-12-25-79/+94
| |\ \
| | * \ Merge branch 'main' into tag-groupsGravatar Johannes Christ2021-12-08-108/+274
| | |\ \
| | | * | Dynamic views for command help embeds (#1939)Gravatar Boris Muratov2021-12-01-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic views for command help embeds Adds views for commands to navigate groups. For subcommands, a button is added to show the parent's help embed. For groups, buttons are added for each subcommand to show their help embeds. The views are not generated when help is invoked in the context of an error.
| | | * | Merge branch 'main' into feature/enhance-incidentsGravatar Shivansh-0072021-11-18-43/+88
| | | |\ \
| | | * \ \ Merge branch 'main' into feature/enhance-incidentsGravatar Shivansh-0072021-10-21-10/+10
| | | |\ \ \
| | | * \ \ \ Merge remote-tracking branch 'upstream/main' into feature/enhance-incidentsGravatar Shivansh-0072021-10-17-58/+101
| | | |\ \ \ \
| | | * | | | | Refactor `shorten_text` utility functionGravatar Shivansh-0072021-10-11-5/+14
| | | | | | | |
| | | * | | | | Goodbye enhanced incidents editsGravatar Shivansh-0072021-10-11-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was discussed with Mr.Webscale (joe), Xithrius in dev-voice
| | | * | | | | Mock id,content attribute rather than type castingGravatar Shivansh-0072021-10-11-3/+4
| | | | | | | |
| | | * | | | | Update tests for message link embedsGravatar Shivansh2021-10-11-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates the test in accordance with 0b35f2a and 0c5561d.
| | | * | | | | (incidents): Use subtests for test_shorten_textGravatar Shivansh2021-10-11-4/+4
| | | | | | | |
| | | * | | | | (incidents): Add test for text shortnerGravatar Shivansh2021-10-11-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass all 3 cases of text shortening to the test case and test them, the cases being: i. If the message is just one word, then shorten to 50 characters. ii. Maximum lines being 3. iii. Maximum characters being 300. This commit also removes a misc bug, of passing self, while asserting equal.
| | | * | | | | Write tests for this featureGravatar Shivansh2021-10-11-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In short, I have written two tests, one which tests the whether `extract_message_links` is called on message edits or not. And the second one to test the regex of `extract_message_links` and assert the message link embeds sent by it. Special thanks to kwzrd💜#1198 for helping me out with it.
| | | * | | | | Ignore N802 in 'asyncSetUp' and 'asyncTearDown' function in test_incidents.pyGravatar Shivansh-0072021-10-11-2/+2
| | | | | | | |
| | | * | | | | Modify tests to support redis cache, done with the help @SebastiaanZGravatar Shivansh-0072021-10-11-16/+16
| | | | | | | |
| | | * | | | | Fix tests according to the changes done to incidents.pyGravatar Shivansh-0072021-10-11-2/+19
| | | | | | | |
| | * | | | | | Merge remote-tracking branch 'upstream/main' into tag-groupsGravatar Numerlor2021-11-09-50/+47
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # bot/converters.py # bot/exts/info/tags.py # tests/bot/test_converters.py
| | * | | | | | | Remove try_get_tag ctx args testGravatar Numerlor2021-09-22-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arguments are now parsed by the command itself so the test would only check if the mocked message was passed in. The only case where the errors would fail would be a change to the passed args, so it'd only restrict development as the tests would need to be changed anyway
| | * | | | | | | Merge remote-tracking branch 'upstream/main' into tag-groupsGravatar Numerlor2021-09-06-360/+1141
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # bot/converters.py # bot/exts/backend/error_handler.py # bot/exts/info/source.py # tests/bot/test_converters.py
| | * | | | | | | | Remove TagNameConverterGravatar Numerlor2021-09-06-53/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The converter was now only used to restrict requested names which can be handled by not matching a tag in the cog and not displaying output, this allows us to be a bit more generous with tag names during the command fallback when a name with invalid symbols is parsed after a group
| | * | | | | | | | Fix testsGravatar Numerlor2021-07-06-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unnecessary invoked with mocks were removed and some more checks added for the new behaviour
| * | | | | | | | | Remove debug `maxDiff` assignment.Gravatar Izan2021-11-25-1/+0
| | | | | | | | | |
| * | | | | | | | | Fix testsGravatar Izan2021-11-16-8/+19
| | |_|_|_|_|_|/ / | |/| | | | | | |
| * | | | | | | | Merge pull request from GHSA-j8c3-8x46-8pp6Gravatar Hassan Abouelela2021-11-05-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't Exit Token Filtering Early On URLs The token filtering function would exit early if it detected a URL within the message, but it made no extra checks to ensure there weren't other tokens within that message that would trigger it. This made sense when the filtering logic was written, but it's been modified since to introduce this bug. Regression tests included. Signed-off-by: Hassan Abouelela <[email protected]> * Links Advisory In Token Filter Tests Adds a link to the advisory with reasoning for the existence of the test. Signed-off-by: Hassan Abouelela <[email protected]>
| * | | | | | | | Migrate to `og_blurple` (#1901)Gravatar TizzySaurus2021-11-01-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate to `og_blurple`
| * | | | | | | | Move to timezone aware datetimes (#1895)Gravatar Boris Muratov2021-10-22-36/+41
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move to timezone aware datetimes With the shift of the discord.py library to timezone aware datetimes, this commit changes datetimes throughout the bot to be in the UTC timezone accordingly. This has several advantages: - There's no need to discard the TZ every time the datetime of a Discord object is fetched. - Using TZ aware datetimes reduces the likelihood of silently adding bugs into the codebase (can't compare an aware datetime with a naive one). - Our DB already stores datetimes in UTC, but we've been discarding the TZ so far whenever we read from it. Specific places in the codebase continue using naive datetimes, mainly for UI purposes (for examples embed footers use naive datetimes to display local time). * Improve ISODateTime converter documentation Co-authored-by: Kieran Siek <[email protected]>
| * | | | | | | Merge branch 'main' into new-appeals-processGravatar ChrisJL2021-10-17-74/+133
| |\ \ \ \ \ \ \ | | | |_|_|_|/ / | | |/| | | | |
| | * | | | | | Merge remote-tracking branch 'origin/main' into discord-2.0Gravatar Matteo Bertucci2021-10-17-26/+6
| | |\ \ \ \ \ \ | | | | |_|/ / / | | | |/| | | |
| | | * | | | | Merge remote-tracking branch 'origin/main' into experiments/isortGravatar Matteo Bertucci2021-10-15-7/+10
| | | |\ \ \ \ \
| | | * | | | | | ISort: give the codebase a sortGravatar Matteo Bertucci2021-10-14-29/+6
| | | | |_|_|/ / | | | |/| | | |
| | * | | | | | Merge branch 'main' into discord-2.0Gravatar Matteo Bertucci2021-10-15-9/+9
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | |
| | | * | | | | Fix newlines after imports and address reviewGravatar Izan2021-10-14-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's now always one blank line (no more, no less) after an import
| | | * | | | | Migrate to `bot.log.get_logger` functionGravatar Izan2021-10-14-8/+9
| | | |/ / / /
| | * | | | | Merge branch 'main' into discord-2.0Gravatar Matteo Bertucci2021-10-10-16/+32
| | |\| | | |
| | | * | | | Merge branch 'main' into ignore-infra-mods-errorsGravatar Joe Banks2021-10-05-10/+23
| | | |\ \ \ \
| | | | * | | | Mock fetch_member in tests that user get_or_fetch nowGravatar Chris Lovering2021-09-29-6/+15
| | | | | | | |
| | | | * | | | Use scheduling create_task util instead of creating from loop directlyGravatar Numerlor2021-09-11-4/+8
| | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | The util attaches an error logging callback instead of relying on python's exception logging which only occurs when the task is destroyed
| | | * / | | Fix testsGravatar Izan2021-09-01-6/+9
| | | |/ / /
| | * | | | Test incidents: correct avatar referenceGravatar Matteo Bertucci2021-10-05-1/+1
| | | | | |
| | * | | | avatar.url -> display_avatar.urlGravatar Matteo Bertucci2021-10-05-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | avatar can apparently be none, which means traceback and a very sad akarys
| | * | | | Silence tests: use thread permsGravatar Matteo Bertucci2021-09-15-10/+54
| | | | | |
| | * | | | Migrate to Discord.py 2.0a0Gravatar Matteo Bertucci2021-09-06-13/+32
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the Discord.py repository has been archived, we can switch to the latest commit of 2.0a0, knowing no breaking change will occur (still pinned to the commit just in case). This commits fixes any problem related to the migration: - New avatar interface - TZ aware datetimes - Various inernal API changes
| * / / / Update infraction DM tests to reflect new outputGravatar Chris Lovering2021-09-24-10/+10
| |/ / /
| * | | Merge branch 'main' into converter-typehintsGravatar ChrisJL2021-08-24-6/+24
| |\ \ \
| | * | | Fix testsGravatar Izan2021-08-24-2/+2
| | | | |
| | * | | Merge branch 'main' into antispam-ignore-bot-mentionsGravatar Boris Muratov2021-08-23-5/+219
| | |\ \ \
| | * | | | Added some more test cases to ensure bot mentions aren't countedGravatar wookie1842021-08-23-1/+17
| | | | | |
| | * | | | Fix current tests by using MockMember in mention listsGravatar wookie1842021-08-23-3/+5
| | | | | |
| * | | | | Remove TagContentConverterGravatar Numerlor2021-08-23-38/+0
| | |/ / / | |/| | |