aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
...
* Appeased the linterGravatar Xithrius2023-11-08-1/+0
|
* Update all references of 3.11 in eval to 3.12 (#2777)Gravatar ChrisJL2023-10-03-14/+14
|
* Centralise error handling for commands invoked from error handler (#2436)Gravatar wookie1842023-09-19-22/+4
|
* Bump ruff from 0.0.285 to 0.0.287 (#2745)Gravatar dependabot[bot]2023-09-06-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * Bump ruff from 0.0.285 to 0.0.287 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.285 to 0.0.287. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.287) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Update bot to comply with ruff 0.0.287 linting rules --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joe Banks <[email protected]>
* Update import style for ruff isort ruleGravatar Chris Lovering2023-08-11-4/+21
| | | | ruff's isort rule doesn't allow multiple imports on the same line if wrapping. This is arguably easier to read too.
* Replace deprecated functions with new pydantic v2 functionsGravatar Chris Lovering2023-08-11-2/+2
|
* Bump ruff from 0.0.282 to 0.0.283Gravatar dependabot[bot]2023-08-10-1/+1
| | | | | | | | | | | | | | | | Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.282 to 0.0.283. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
* Change DM users get when warned (#2696)Gravatar Steele Farnsworth2023-08-05-5/+5
|
* Mock _lexers_supported_by_pastebin in test to ensure no call to external ↵Gravatar Chris Lovering2023-07-11-0/+4
| | | | service is made
* Use the new pydis_core send_to_paste_service functionGravatar Chris Lovering2023-07-11-101/+2
|
* Fix some test warnings (#2675)Gravatar wookie1842023-07-09-5/+18
| | | | | | | * Fix test warnings * Remove unnecessary event_loop parameters This is not necessary as the current event loop will be used which is the same as self.bot.loop. Removing these should slightly improve test speed as the mock for self.bot.loop doesn't need to be created.
* Update MockAttachment data with new expected fieldsGravatar Chris Lovering2023-06-21-1/+12
|
* Write custom get_role func for MockMemberGravatar Chris Lovering2023-06-21-0/+3
| | | | The new d.py Member.get_role uses the Guild.get_role function if the member has the role. SInce we don't set Guild.roles overwrite this instead.
* Allow use of msg reply to add context to incidentGravatar vivekashok12212023-06-21-0/+1
|
* Use f-string conversions over functionsGravatar Chris Lovering2023-05-24-1/+1
|
* Don't collect coverage info by default when running testsGravatar wookie1842023-04-16-6/+6
|
* Improve test speed using some cached_property decorators on mocksGravatar wookie1842023-04-15-6/+30
|
* Migrate code style to ruffGravatar Chris Lovering2023-04-11-440/+446
| | | | | Co-authored-by: Boris Muratov <[email protected]> Co-authored-by: wookie184 <[email protected]>
* Remove dead or unused code (#2528)Gravatar Boris Muratov2023-04-11-170/+0
|
* Merge branch 'main' into 2302-activity-in-reviewsGravatar Boris Muratov2023-04-09-1507/+712
|\
| * Adjust to site using dicts in additional_settings instead of JSON stringsGravatar Boris Muratov2023-04-06-3/+3
| | | | | | | | This is to make sure that the unique constraint always compares between dicts instead of sometimes dealing with nulls.
| * Fix testGravatar Boris Muratov2023-04-05-1/+1
| |
| * Merge branch 'main' into new-filtersGravatar Boris Muratov2023-04-05-1/+2
| |\
| | * Replace mock._importer with pkgutil.resolve_name in test autospecGravatar shtlrs2023-03-29-1/+2
| | | | | | | | | | | | mock._importer was removed in 3.11
| * | Support custom value representation in filtering UIGravatar mbaruh2023-03-28-7/+9
| | | | | | | | | | | | Adds the `CustomIOField` class which can be used as a base for wrappers that store a value with a customized way to process the user input and to present the value in the UI.
| * | Rename additional_field to additional_settingsGravatar mbaruh2023-03-26-3/+3
| | |
| * | Add support for snekbox IO in the new filtering systemGravatar mbaruh2023-03-23-19/+19
| | |
| * | Fix filtering testsGravatar mbaruh2023-03-23-6/+6
| | |
| * | Merge branch 'main' into new-filtersGravatar mbaruh2023-03-21-83/+254
| |\|
| * | Merge branch 'main' into new-filtersGravatar mbaruh2023-02-28-48/+80
| |\ \
| * | | Bring back old system testsGravatar mbaruh2023-01-22-11/+484
| | | |
| * | | Add the rest of the antispam rulesGravatar mbaruh2022-11-01-3/+3
| | | | | | | | | | | | | | | | | | | | This is mostly a copy-paste of the implementations in the old system into the new system's structure. The mentions rule required changing the `triggers_on` method to async.
| * | | Merge branch 'main' into new-filtersGravatar mbaruh2022-10-23-6/+270
| |\ \ \
| * | | | Fix testsGravatar mbaruh2022-10-01-279/+42
| | | | |
| * | | | Split actions and validations to their own packcagesGravatar mbaruh2022-09-30-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a purely aesthetic choice. Additionally fixes a small bug where a missing entry type would repeatedly invoke a warning on cog load.
| * | | | Merge branch 'main' into new-filtersGravatar mbaruh2022-09-24-217/+477
| |\ \ \ \
| * | | | | Accept strings in channel scope and change role string interpretationGravatar mbaruh2022-07-16-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The channel scope settings were changed to accomodate strings. That means that if a string is specified, the bot will look whether the context channel's name matches. If it's a number, it will match the ID. Accordingly the same changed was applied to the bypass roles and pings settings: if it's a non-numeric string, it will look for a role with that name.
| * | | | | New filtering backbone and regex filtering migrationGravatar mbaruh2022-07-16-0/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit provides the basis of the new filtering system: - The filtering cog consists of several filter lists loaded from the database (filtering.py). - Each filter list contains a list of filters, which are run in response to events (message posting, reaction, thread creation). Each filter list may choose to respond to different events (the subscribe method in filtering.py). - Each filter has settings (settings.py) which decide when it is going to be run (e.g it might be disabled in a specific channel), and what will happen if it triggers (e.g delete the offending message). - Not every filter has a value for every setting (the _settings_types package) . It will use the default settings specified by its filter list as a fallback. - Since each filter might have a different effect when triggered, we must check all relevant filters even if we found a triggered filter already, unlike in the old system. - Two triggered filters may specify different values for the same setting, therefore each entry has a rule for combining two different values (the __or__ method in each file in _settings_types). To avoid having to prefix each file with an underscore (or the bot will try to load it as a cog), the loading script was changed to ignore packages with names starting with an underscore. Alert sending is done via a webhook so that several embeds can be sent in the same message (will be useful for example for guild invite alerts). Filter lists and setting entries classes are loaded dynamically from their respective packages. In order to be able to test the new features, this commit also includes a migration of the regex-based filtering.
| * | | | | Tear down the old filtering systemGravatar mbaruh2022-07-15-1503/+0
| | | | | | | | | | | | | | | | | | | | | | | | Tests and dependent functionality in other extensions will be re-added later on.
* | | | | | Merge branch 'main' into 2302-activity-in-reviewsGravatar wookie1842023-03-25-91/+291
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | Merge branch 'main' into snekbox-filesGravatar Ionite2023-03-09-13/+75
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # bot/constants.py # bot/exts/utils/snekbox/_cog.py # config-default.yml
| | * | | | | Bump markdownify from 0.6.1 to 0.11.6 (#2429)Gravatar dependabot[bot]2023-03-07-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: wookie184 <[email protected]>
| | * | | | | Merge branch 'main' into 2301-fix-voting-conditionsGravatar Boris Muratov2023-03-03-11/+40
| | |\ \ \ \ \ | | | | |_|_|/ | | | |/| | |
| | | * | | | add the `flags` key to the member_data dictionaryGravatar shtlrs2023-02-28-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value 2 represents the `COMPLETED_ONBOARDING` flag, found here https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
| | | * | | | Merge branch 'main' into migration/tagGravatar wookie1842023-02-27-3/+3
| | | |\ \ \ \
| | | * | | | | Implement reviewsGravatar Ibrahim2023-02-26-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + used both `discord.User` and `discord.Member` in typehinting as `InteractionResponse.user` returns `discord.User` object + removed `ErrorHandler()._can_run` + edited `try_get_tag` to use `bot.can_run` + removed `/tag list` + change `/tag get <name>` to `/tag <name>` + remove redundant `GUILD_ID` in `tags.py` + using `discord.abc.Messageable` because `ctx.channel` returns that instead of `Channel` Object
| | | * | | | | Implement all reviewsGravatar Ibrahim2023-02-23-26/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + Remove commented code + Remove unecessarily syncting the bot + Handle direct tag commads + 3.10 type hinting in concerned functions + Add `MockInteractionMessage` + Fix tests for `try_get_tag`
| | | * | | | | Update tests for `/tag` as of migration to slash commandsGravatar Ibrahim2750mi2023-02-14-22/+42
| | | | | | | |
| | * | | | | | Merge branch 'main' into 2301-fix-voting-conditionsGravatar wookie1842022-11-30-7/+7
| | |\| | | | |
| | * | | | | | Merge branch 'main' into 2301-fix-voting-conditionsGravatar wookie1842022-11-05-31/+34
| | |\ \ \ \ \ \