aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
* Use new application format for message data in test helperGravatar Chris Lovering2022-06-28-1/+1
|
* Merge branch 'main' into improve-pastebin-error-handlingGravatar ChrisJL2022-06-07-2/+7
|\
| * Fix testsGravatar wookie1842022-05-28-0/+3
| |
| * Bump malformed API response from debug to error log (#2175)Gravatar wookie1842022-05-21-2/+4
| |
* | Make small wording and style changesGravatar wookie1842022-05-29-2/+3
| |
* | Raise ValueError if max_length greater than allowed by paste serviceGravatar wookie1842022-05-29-0/+5
| |
* | Fix testsGravatar wookie1842022-05-02-10/+17
|/
* Speed Up Sync Cog LoadingGravatar Hassan Abouelela2022-04-23-1/+1
| | | | | | | | | | | | The user syncer was blocking the startup of the sync cog due to having to perform thousands of pointless member fetch requests. This speeds up that process by increasing the probability that the cache is up-to-date using `Guild.chunked`, and limiting the fetches to members who were in the guild during the previous sync only. Co-authored-by: ChrisJL <[email protected]> Co-authored-by: wookie184 <[email protected]> Signed-off-by: Hassan Abouelela <[email protected]>
* remove unneeded import in testsGravatar Chris Lovering2022-04-20-1/+0
|
* Pass the now required intents kwarg when creating MockBotGravatar Chris Lovering2022-04-19-0/+1
|
* Add missing underscores to test function namesGravatar Chris Lovering2022-04-18-3/+3
|
* Test that sync cog syncers run when sync cog is loadedGravatar Chris Lovering2022-04-18-0/+13
|
* Don't try to overwrite a read-only attr in help command testGravatar Chris Lovering2022-04-18-1/+1
|
* Remove sync cog init testGravatar Chris Lovering2022-04-18-17/+0
| | | | Discord.py now implicitly calls the new async cog_load function from within it's internals on load. There is no longer a need to test that this happens.
* Update tests to use new async cog_load functionGravatar Chris Lovering2022-04-18-25/+17
|
* Update tests to use new async cog setup functionGravatar Chris Lovering2022-04-18-29/+28
|
* Update test helpers with breaking d.py changesGravatar Chris Lovering2022-04-18-1/+5
| | | | | | | region was removed from the guild object, so this has been replaced with features add_cog is now async, so it is now an async_mock during tests Two new required voice_channel attrs were added channel.type is required to be set to ChannelType due to a new isinstance check in d.py
* Adding missing kwargs required by BotBase in test helperGravatar Chris Lovering2022-04-18-0/+3
|
* Remove async stats and site api wrapperGravatar Chris Lovering2022-04-18-72/+7
| | | | We now source them from bot-core, so no need to have them here too.
* Use bot-core scheduling and member util functionsGravatar Chris Lovering2022-04-18-2/+2
|
* Merge branch 'main' into feat/timeit-commandGravatar wookie1842022-03-31-21/+208
|\
| * Revert "Update all references of discord.py to disnake"Gravatar Chris Lovering2022-03-15-132/+132
| | | | | | | | This reverts commit 960619c23300c56c8aaa454edc7241e2badf80ad.
| * Merge main into feat/mod/1664/resend-infractionGravatar MarkKoz2022-03-05-132/+132
| |\
| | * Update all references of discord.py to disnakeGravatar Chris Lovering2022-03-05-132/+132
| | | | | | | | | | | | All of the tag content is out of scope for this PR.
| * | Merge main into feat/mod/1664/resend-infractionGravatar MarkKoz2022-02-22-427/+972
| |\|
| | * Remove unnecessary Infraction conversion in clean ban (#2092)Gravatar ChrisJL2022-02-16-4/+2
| | |
| | * Typo and docstrings in clean ban testsGravatar Chris Lovering2022-02-16-1/+2
| | | | | | | | | | | | Co-authored-by: GDWR <[email protected]>
| | * Send error when cleanban fails to banGravatar Chris Lovering2022-02-16-1/+1
| | | | | | | | | | | | Co-authored-by: GDWR <[email protected]>
| | * Add tests for new CleanBan and Clean functionalityGravatar Chris Lovering2022-02-16-1/+193
| | |
| * | Add util function to send an infraction using an Infraction dictGravatar MarkKoz2021-07-15-2/+2
| | | | | | | | | | | | | | | There was some redundant pre-processing of arguments happening before calling `notify_infraction`.
* | | Merge branch 'main' into feat/timeit-commandGravatar ToxicKidz2022-02-15-43/+43
|\ \ \ | | |/ | |/|
| * | Refactor voice_ban function definitions to voice_muteGravatar Chris Lovering2022-01-25-39/+39
| | | | | | | | | | | | | | | | | | This changes all functions that reference voice_ban to voice_mute instead, which comes with breaking front-end changes. These front end changes are desirable, so that moderators get used to use voice_mute now, rather than voice_ban, in preparation for when we roll out real voice_bans.
| * | Rename voice_ban type to voice_muteGravatar Chris Lovering2022-01-25-4/+4
| | | | | | | | | | | | | | | | | | This commit changes all of the back-end so that it is in line with the new site API (see this PR https://github.com/python-discord/site/pull/608). This comes with no changes to commands, or functions definitions.
* | | tests: Add a test for timeit command codeblock preparationGravatar ToxicKidz2022-02-05-0/+15
| | |
* | | fix: Use filter_snekbox_output rather than jobGravatar ToxicKidz2022-02-04-3/+3
| | |
* | | chore: Switch Snekbox.prepare_input with a CodeblockConverterGravatar ToxicKidz2022-01-27-53/+52
| | | | | | | | | | | | As per @Numerlor's suggestion
* | | Merge branch 'main' of https://github.com/python-discord/bot into ↵Gravatar ToxicKidz2022-01-26-28/+28
|\| | | | | | | | | | | feat/timeit-command
| * | Time: return strings from until_expiration instead of ambiguous NoneGravatar MarkKoz2021-08-07-3/+2
| | | | | | | | | | | | | | | None was returned for two separate cases: permanent infractions and expired infractions. This resulted in an ambiguity.
| * | Fix create_user_embed testsGravatar MarkKoz2021-08-07-0/+9
| | | | | | | | | | | | | | | | | | | | | Mock User.created_at and User.joined_at because `arrow.get()` doesn't work with Mock objects. The old implementation of `time.discord_timestamp` accepted mocks because it just did `int()` on any type it didn't explicitly check for.
| * | Time: add overload to pass 2 timestamps to humanize_deltaGravatar MarkKoz2021-08-06-5/+8
| | | | | | | | | | | | | | | | | | | | | Remove the need for the caller to create a `relativedelta` from 2 timestamps before calling `humanize_delta`. This is especially convenient for cases where the original inputs aren't `datetime`s since `relativedelta` only accepts those.
| * | Time: support more timestamp formats as argumentsGravatar MarkKoz2021-08-05-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the burden of conversion from the caller to clean up and simplify the call sites. Handle timestamp conversions internally with arrow.get. Remove format_infraction and get_time_delta because they're now obsolete. Replace the former with discord_timestamp and the latter with format_relative.
| * | Time: rename format_infraction_with_durationGravatar MarkKoz2021-08-05-9/+9
| | | | | | | | | | | | It's not necessarily tied to infractions anymore.
| * | Time: remove RFC1123 supportGravatar MarkKoz2021-08-05-7/+0
| | | | | | | | | | | | It's not used anywhere and hasn't been for a very long time.
* | | chore: Remove the naming of 'eval' in certain placesGravatar ToxicKidz2022-01-26-3/+3
| | | | | | | | | | | | Since the !eval command is no longer the only snekbox command, make the naming more generic.
* | | chore: Apply suggestions and adjust testsGravatar ToxicKidz2022-01-17-13/+11
| | |
* | | fix: Modify tests to correspond with Snekbox.continue_evalGravatar ToxicKidz2022-01-17-8/+11
| | |
* | | chore: Suppress output in the setup code, not the code that gets timed.Gravatar ToxicKidz2022-01-13-3/+3
| | | | | | | | | | | | If multiple formatted codeblocks are passed to the command, the first one will be used as the setup code that does not get timed.
* | | chore: Fix merge conflictsGravatar ToxicKidz2022-01-13-592/+1564
|\| |
| * | Fix snekbox tests with new allowed_mentionsGravatar Ben Soyka2022-01-08-4/+20
| | |
| * | Add text indicating when user fetched by message (#2013)Gravatar TizzySaurus2021-12-29-12/+12
| | | | | | | | | Co-authored-by: Xithrius <[email protected]>