aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
...
| | | * | | | | | | Infraction Tests: Small fixesGravatar ks1292020-05-20-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove unnecessary space from placeholder - Rename `has_active_infraction` to `get_active_infraction`
| | | * | | | | | | ModLog Tests: Fix truncation tests docstringGravatar ks1292020-05-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Leon Sandøy <[email protected]>
| | | * | | | | | | (Infractions and ModLog Tests): Replaced `shortening` with `truncation`, ↵Gravatar ks1292020-04-16-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | removed unnecessary type hint and added comment to kick truncation test about awaiting `kick`.
| | | * | | | | | | (ModLog Tests): Created reason shortening tests for `send_log_message`.Gravatar ks1292020-04-16-0/+29
| | | | | | | | | |
| | | * | | | | | | (Infraction Tests): Created reason shortening tests for ban and kick.Gravatar ks1292020-04-16-0/+54
| | | | | | | | | |
| | | * | | | | | | (Test Helpers): Added `__ge__` function to `MockRole` for comparing.Gravatar ks1292020-04-15-0/+4
| | | | |_|_|/ / / | | | |/| | | | |
| | * | | | | | | Fix failing tests related to avatar_hashGravatar Leon Sandøy2020-05-27-5/+0
| | | |/ / / / / | | |/| | | | |
| | * | | | | | Merge branch 'master' into eval-timeout-increaseGravatar Dennis Pham2020-05-19-3/+2
| | |\ \ \ \ \ \ | | | | |_|_|/ / | | | |/| | | |
| | * | | | | | Change tests to use the new timeout constantGravatar Numerlor2020-05-15-1/+5
| | | |_|/ / / | | |/| | | |
| * / | | | | Improve LinePaginator to support long linesGravatar Kyle Stanley2020-06-04-7/+34
| |/ / / / /
* | | | | | EH Tests: Create test for `handle_unexpected_error`Gravatar ks1292020-05-19-2/+37
| | | | | |
* | | | | | EH Tests: Create test for `ErrorHandler` `setup` functionGravatar ks1292020-05-19-1/+11
| | | | | |
* | | | | | EH Tests: Create tests for `handle_api_error`Gravatar ks1292020-05-19-0/+33
| | | | | |
* | | | | | EH Tests: Merge test classesGravatar ks1292020-05-19-11/+4
| | | | | |
* | | | | | EH Tests: Create test for `handle_check_failure`Gravatar ks1292020-05-19-0/+48
| | | | | |
* | | | | | EH Tests: Create test for `handle_input_error`Gravatar ks1292020-05-19-6/+36
| | | | | |
* | | | | | EH Tests: Created test for `handle_user_input_error` `get_help_command`Gravatar ks1292020-05-19-0/+16
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` `ResponseCodeError` ignoreGravatar ks1292020-05-19-0/+6
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` `ctx.invoke` callingGravatar ks1292020-05-19-0/+7
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` tag name converting failingGravatar ks1292020-05-19-0/+9
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` successful tag name convertingGravatar ks1292020-05-19-0/+9
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` error handlingGravatar ks1292020-05-19-2/+11
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` checks failGravatar ks1292020-05-19-2/+8
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` `invoked_from_error_handler`Gravatar ks1292020-05-19-0/+7
| | | | | |
* | | | | | EH Tests: Added test for `try_get_tag` `get_command` callingGravatar ks1292020-05-19-0/+19
| | | | | |
* | | | | | EH Tests: Added tests for `get_help_command`in `OtherErrorHandlerTests`Gravatar ks1292020-05-19-0/+32
| | | | | |
* | | | | | EH Tests: Cleanup `try_silence` testsGravatar ks1292020-05-18-39/+27
| | | | | |
* | | | | | EH Tests: Added test for `try_silence` no match messageGravatar ks1292020-05-18-0/+6
| | | | | |
* | | | | | EH Tests: Created `try_silence` test to test unsilence command callingGravatar ks1292020-05-18-0/+17
| | | | | |
* | | | | | EH Tests: Created `try_silence` test to test silence command callingGravatar ks1292020-05-18-0/+17
| | | | | |
* | | | | | EH Tests: Created `try_silence` test to check no permission with exceptGravatar ks1292020-05-18-0/+8
| | | | | |
* | | | | | EH Tests: Created `try_silence` test to check no permission responseGravatar ks1292020-05-18-2/+9
| | | | | |
* | | | | | EH Tests: Created `try_silence` test for `get_command`Gravatar ks1292020-05-18-0/+9
| | | | | |
* | | | | | EH Tests: Created first test for `try_silence`Gravatar ks1292020-05-18-0/+18
| | | | | |
* | | | | | EH Tests: Created test for all other errorsGravatar ks1292020-05-18-0/+8
| | | | | |
* | | | | | EH Tests: Added test for 3 errors handling on handlerGravatar ks1292020-05-18-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These 3 errors is: - `ConversionError` - `MaxConcurrencyReached` - `ExtensionError`
* | | | | | EH Tests: Added test for `CommandInvokeError` handling on handlerGravatar ks1292020-05-18-0/+22
| | | | | |
* | | | | | EH Tests: Added test for `CommandOnCooldown` handling on handlerGravatar ks1292020-05-18-0/+8
| | | | | |
* | | | | | EH Tests: Added test for `CheckFailure` handling on handlerGravatar ks1292020-05-18-0/+9
| | | | | |
* | | | | | EH Tests: Added test for `UserInputError` handling on handlerGravatar ks1292020-05-18-0/+9
| | | | | |
* | | | | | EH Tests: Added another test for `CommandNotFound` error handlingGravatar ks1292020-05-18-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added test for case when `Context.invoked_from_error_handler` is `True`
* | | | | | Test Helpers: Added new attribute to `MockContext`Gravatar ks1292020-05-18-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Added `invoked_from_error_handler` attribute that is `False` default.
* | | | | | EH Tests: Remove class member `cog` + other small changesGravatar ks1292020-05-18-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added `assertIsNone` to `test_error_handler_already_handled`. - Removed `ErrorHandlerTests.cog`, moved it to each test recreation.
* | | | | | EH Tests: Created test for `CommandNotFound` error when call isn't by EHGravatar ks1292020-05-18-0/+49
| | | | | |
* | | | | | EH Tests: Created test cases set + already handled error testGravatar ks1292020-05-18-0/+22
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Created test that make sure when error is already handled in local error handler, this don't await `ctx.send` to make sure that this don't move forward.
* | | | | Use `Command`-object for `send_help`Gravatar Sebastiaan Zeeff2020-05-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As @mathsman5133 pointed out, it's better to use the `Command`-instance we typically already have in the current context than to rely on parsing the qualified name again. The invocation is now done as: `await ctx.send_help(ctx.command)`
* | | | | Use `send_help` to invoke command helpGravatar Sebastiaan Zeeff2020-05-17-2/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the refactoring of the help command, we need to use the built-in method of calling the help command: `Context.send_help`. As an argument, the qualified name (a string containing the full command path, including parents) of the command can be passed. Examples: - await ctx.send_help("reminders edit") This would send a help embed with information on `!reminders edit` to the Context. - await ctx.send_help(ctx.command.qualified_name) This would extract the qualified name of the command, which is the full command path, and send a help embed to Context. - await ctx.send_help() This will send the main "root" help embed to the Context.
* | | | Tests: change avatar_url_as assertion to use static_formatGravatar MarkKoz2020-04-30-1/+1
| | | |
* | | | Add DMChannel tests for in_whitelist decoratorGravatar Sebastiaan Zeeff2020-04-27-31/+63
| | | | | | | | | | | | | | | | | | | | | | | | The `in_whitelist` decorator should not fail when a decorated command was called in a DMChannel; it should simply conclude that the user is not allowed to use the command. I've added a test case that uses a DMChannel context with User, not Member, objects. In addition, I've opted to display a test case description in the `subTest`: Simply printing the actual arguments and context is messy and does not actually show you the information you'd like. This description is enough to figure out which test is failing and what the gist of the test is.
* | | | Add mock for discord.DMChannelsGravatar Sebastiaan Zeeff2020-04-27-0/+21
| | | |