aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
...
| | | | | | * | | | | | | | (Moderation Utils Tests): Added following new assertions to ↵Gravatar ks1232020-03-05-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `has_active_infraction` tests: `ctx.send` and `bot.api_client.get` calling.
| | | | | | * | | | | | | | (Moderation Utils Tests): Use `bot.cogs.moderation.utils`'s `RULES_URL` ↵Gravatar ks1232020-03-05-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead creating new one
| | | | | | * | | | | | | | (Moderation Utils Tests): Removed unnecessary `AsyncMock()` from `__init__` ↵Gravatar ks1232020-03-05-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (`self.bot.api_client.get`)
| | | | | | * | | | | | | | (Moderation Utils Tests): Moved `has_active_infraction` tests to one test.Gravatar ks1232020-03-05-22/+35
| | | | | | | | | | | | | |
| | | | | | * | | | | | | | (Moderation Utils Tests): `send_private_embed` moved exception creating from ↵Gravatar ks1232020-03-05-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cases testing to test cases listing, added side_effect resetting.
| | | | | | * | | | | | | | (Moderation Utils Tests): Created tests for `post_infraction` function, ↵Gravatar ks1232020-03-05-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | created __init__.py for moderation tests
| | | | | | * | | | | | | | (Moderation Utils Tests): Created tests for `send_private_embed` function + ↵Gravatar ks1232020-03-04-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed errors.
| | | | | | * | | | | | | | (Moderation Utils Tests): Created tests for `post_user` function.Gravatar ks1232020-03-04-1/+59
| | | | | | | | | | | | | |
| | | | | | * | | | | | | | (Moderation Utils Tests): Created tests for `notify_pardon` function.Gravatar ks1232020-03-04-2/+39
| | | | | | | | | | | | | |
| | | | | | * | | | | | | | (Moderation Utils Tests): Created tests for `notify_infraction` function.Gravatar ks1232020-03-04-2/+91
| | | | | | | | | | | | | |
| | | | | | * | | | | | | | (Moderation Utils Tests): Created tests for `has_active_infraction` functionGravatar ks1232020-03-03-0/+24
| | | | | | | | | | | | | |
| | | | | | * | | | | | | | (Moderation Utils Tests): Added imports, modified tests class instance and ↵Gravatar ks1232020-03-03-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | created new params for tests class
| | | | | | * | | | | | | | Created file for moderation utils tests + added setUp to this.Gravatar ks1232020-03-03-0/+12
| | | | | | | | | | | | | |
| | | | | * | | | | | | | | Fix cog_check testsGravatar MarkKoz2020-09-08-8/+12
| | | | | | | | | | | | | |
| | | | | * | | | | | | | | Fix tests for has_any_role_checkGravatar MarkKoz2020-09-08-16/+18
| | | | | | | | | | | | | |
| | | | | * | | | | | | | | Rename role checks and decoratorsGravatar MarkKoz2020-09-08-18/+18
| | | | | | |_|_|_|_|/ / / | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make their names more in line with `has_any_role` for consistency.
| | | | * | | | | | | | | Remove unit tests for duck pondGravatar Sebastiaan Zeeff2020-09-20-548/+0
| | | | | |_|_|_|_|/ / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've removed the unit tests for duckpond in concordance with the new policy for writing unit tests for the bot The tests were unnecessarily complicated, difficult to maintain, and slowed development. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | | | | | Remove vestigial RedisCache class definitionGravatar Sebastiaan Zeeff2020-09-19-265/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we're now using the `async-rediscache` package, it's no longer necessary to keep the `RedisCache` defined in `bot.utils.redis_cache` around. I've removed the file containing it and the tests written for it. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | | | | | Use async-rediscache package for our redis cachesGravatar Sebastiaan Zeeff2020-09-19-1/+5
| | | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've migrated our redis caches over to the async-rediscache package that we've recently released (https://git.pydis.com/async-rediscache). The main functionality remains the same, although the package handles some things, like getting the active session, differently internally. The main changes you'll note for our bot are: - We create a RedisSession instance and ensure that it connects before we even create a Bot instance in `__main__.py`. - We are now actually using a connection pool instead of a single connection. - Our Bot subclass now has a new required kwarg: `redis_session`. - Bool values are now properly converted to and from typestrings. In addition, I've made sure that our MockBot passes a MagicMock for the new `redis_session` kwarg when creating a Bot instance for the spec_set. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| | | * | | | | | | | Merge branch 'master' into truncate-internal-evalGravatar Kieran Siek2020-09-16-122/+1305
| | | |\| | | | | | |
| | | | * | | | | | | Merge branch 'master' into remove-wolframGravatar Leon Sandøy2020-09-02-0/+22
| | | | |\ \ \ \ \ \ \
| | | | | * | | | | | | Fixed old tests and added 2 new onesGravatar wookie1842020-09-01-0/+22
| | | | | | | | | | | |
| | | | * | | | | | | | Removed ImagePaginator testing.Gravatar Xithrius2020-08-31-15/+0
| | | | |/ / / / / / /
| | | | * | | | | | | Merge branch 'master' into feat/backend/707/alias-decoratorGravatar Shirayuki Nekomata2020-08-26-32/+55
| | | | |\ \ \ \ \ \ \
| | | | * | | | | | | | Include root aliases in the command name conflict testGravatar MarkKoz2020-08-22-0/+1
| | | | | |_|_|_|/ / / | | | | |/| | | | | |
| | | * | | | | | | | Change tests to work with the new file layout.Gravatar Numerlor2020-07-15-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 326beebe9b097731a39ecc9868e5e1f2bd762aae
| | | * | | | | | | | Merge branch 'master' into truncate-internal-evalGravatar Numerlor2020-06-21-179/+662
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # bot/utils/__init__.py
| | | * \ \ \ \ \ \ \ \ Merge branch 'master' into truncate-internal-evalGravatar Numerlor2020-05-30-33/+390
| | | |\ \ \ \ \ \ \ \ \
| | | * | | | | | | | | | Add tests for `send_to_paste_service`.Gravatar Numerlor2020-05-08-0/+74
| | | | | | | | | | | | |
| | | * | | | | | | | | | Adjust behaviour for new func usage.Gravatar Numerlor2020-05-07-14/+5
| | | | | | | | | | | | |
| | | * | | | | | | | | | Remove tests from moved function.Gravatar Numerlor2020-05-07-15/+0
| | | | |_|_|_|_|/ / / / | | | |/| | | | | | | |
| | * | | | | | | | | | Resolve conflicts in filtering.pyGravatar MarkKoz2020-08-10-9/+15
| | |\ \ \ \ \ \ \ \ \ \ | | | | |_|_|/ / / / / / | | | |/| | | | | | | |
| | * | | | | | | | | | Use format_user in token remover testGravatar MarkKoz2020-08-10-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The point of format_user is to have a consistent format across the code base. That should apply to tests too.
| | * | | | | | | | | | Fix conflict with disabling filter ping for DMsGravatar MarkKoz2020-08-02-0/+173
| | |\ \ \ \ \ \ \ \ \ \
| | * | | | | | | | | | | Fix test for token remover log messageGravatar MarkKoz2020-07-21-2/+1
| | | | | | | | | | | | |
| * | | | | | | | | | | | Fix user command testsGravatar MarkKoz2020-08-26-13/+7
| | |_|_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mocking the bot commands channel constant no longer worked after switching to `in_whitelist_check`.
| * | | | | | | | | | | Update tests for user commandsGravatar Joseph Banks2020-08-14-32/+55
| | |_|/ / / / / / / / | |/| | | | | | | | |
| * | | | | | | | | | Merge branch 'master' into whitelist_systemGravatar Leon Sandøy2020-08-03-3/+946
| |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / | | |/| | | | | | | |
| | * | | | | | | | | Jam tests: use the MAX_CHANNELS constant moreGravatar MarkKoz2020-07-22-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's clearer to write MAX_CHANNELS - 2 than a literal 48.
| | * | | | | | | | | Jam tests: assert equality of new categoryGravatar MarkKoz2020-07-22-1/+2
| | | | | | | | | | |
| | * | | | | | | | | Jam tests: add subtests to non-existent category testGravatar MarkKoz2020-07-22-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test has to account for not only the name not matching, but also a lack of available spaces for new channels.
| | * | | | | | | | | Jam tests: fix category testGravatar MarkKoz2020-07-22-14/+24
| | | | | | | | | | |
| | * | | | | | | | | Merge branch 'master' into jam-testGravatar Mark2020-07-22-185/+1384
| | |\| | | | | | | |
| | | * | | | | | | | Edited tests to reflect changes (removed py formatting)Gravatar wookie1842020-07-20-3/+3
| | | | | | | | | | |
| | | * | | | | | | | Merge 'master' into 'kwzrd/incidents'; resolve config conflictsGravatar kwzrd2020-07-16-39/+24
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add upstream changes & resolve config conflicts introduced by #1041. In the conflicting parts of the diff, this commit also re-sorts constants which were added upstream to lexicographical order. This does **not** re-sort all constants added upstream.
| | | * | | | | | | | | Incidents: reduce log level of 404 exceptionGravatar kwzrd2020-07-16-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
| | | * | | | | | | | | Incidents: link `proxy_url` if attachment fails to downloadGravatar kwzrd2020-07-14-37/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Mark during review. If the download fails, we fallback on showing an informative message, which will link the attachment cdn link. The attachment-handling logic was moved from the `archive` coroutine into `make_embed`, which now also returns the file, if available. In the end, this appears to be the smoothest approach. Co-authored-by: MarkKoz <[email protected]>
| | | * | | | | | | | | Incidents: add `download_file` helper & testsGravatar kwzrd2020-07-13-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
| | | * | | | | | | | | Incidents tests: improve in-line comment wordingGravatar kwzrd2020-07-09-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: MarkKoz <[email protected]>
| | | * | | | | | | | | Merge 'master' into 'kwzrd/incidents'; resolve mod pkg init conflictGravatar kwzrd2020-07-08-24/+242
| | | |\ \ \ \ \ \ \ \ \