| Commit message (Collapse) | Author | Age | Lines | |
|---|---|---|---|---|
| * | (Moderation Utils Tests): Moved mock resetting to beginning of subtest in ↵ | 2020-03-08 | -4/+2 | |
| | | | | | `post_user` and `send_private_embed` test. | |||
| * | (Moderation Utils Tests): Removed unnecessary `if` check from ↵ | 2020-03-08 | -2/+1 | |
| | | | | | `send_private_embed` test | |||
| * | (Moderation Utils Tests): Hard-coded args for `send_private_embed` test. | 2020-03-08 | -10/+6 | |
| | | ||||
| * | (Moderation Utils Tests): Added new check to `post_user` test (`ctx.send` ↵ | 2020-03-08 | -35/+16 | |
| | | | | | content test), improved test cases. | |||
| * | (Moderation Utils Tests): Moved `expected_output` from `Dict` to ↵ | 2020-03-08 | -15/+9 | |
| | | | | | `discord.Embed` in `notify_pardon` test. | |||
| * | (Moderation Utils Tests): Removed unnecessary `ctx.send` `side_effect` from ↵ | 2020-03-08 | -11/+4 | |
| | | | | | `notify_pardon`, applied changes to test cases. | |||
| * | (Moderation Utils Tests): Moved `notify_infraction` embed check from dict to ↵ | 2020-03-08 | -28/+43 | |
| | | | | | `Embed`. | |||
| * | (Moderation Utils Tests): Removed unnecessary `ctx.send` mock resetting, ↵ | 2020-03-08 | -4/+1 | |
| | | | | | moved `send_private_embed` mock reset to beginning of subtest. | |||
| * | (Moderation Utils Tests): Removed unnecessary `ctx.send` `side_effect` and ↵ | 2020-03-08 | -12/+6 | |
| | | | | | removed these in test cases too in `notify_infraction` test. | |||
| * | (Moderation Utils Tests): Removed `Dict` unpacking in `notify_infraction` test. | 2020-03-08 | -20/+20 | |
| | | ||||
| * | (Moderation Utils Tests): Cleaned up `has_active_infraction` test cases, ↵ | 2020-03-08 | -30/+11 | |
| | | | | | hard-coded args, moved mocks resetting to beginning of subtest, added `ctx.send` check only is infraction nr and type in sent string. | |||
| * | (Moderation Utils Tests): Hard-coded API get request params for ↵ | 2020-03-08 | -13/+6 | |
| | | | | | `has_active_infraction` test. | |||
| * | (Moderation Utils Tests): Removed large `utils` parts import, use import ↵ | 2020-03-08 | -12/+10 | |
| | | | | | `utils` instead and added `utils` before variables and function that was imported directly before. | |||
| * | (Moderation Utils Tests): Fixed docstrings, added more information to these. | 2020-03-08 | -6/+8 | |
| | | ||||
| * | (Moderation Utils Tests): Fixed errors, added checks before assertions for ↵ | 2020-03-05 | -1/+4 | |
| | | | | | errors | |||
| * | (Moderation Utils Tests): Added additional assertions to `post_infraction` test. | 2020-03-05 | -8/+54 | |
| | | ||||
| * | (Moderation Utils Tests): Added `user.send` call assertion to ↵ | 2020-03-05 | -0/+2 | |
| | | | | | `test_send_private_embed`. | |||
| * | (Moderation Utils Tests): Added API POST call assertion to `test_post_user`. | 2020-03-05 | -5/+24 | |
| | | ||||
| * | (Moderation Utils Tests): Added new assertions to `notify_pardon`, added ↵ | 2020-03-05 | -6/+24 | |
| | | | | | `ctx.send` raising errors, added check for return values and `send_private_embed` call. | |||
| * | (Moderation Utils Tests): Added new assertions to `post_infraction`, added ↵ | 2020-03-05 | -11/+33 | |
| | | | | | `ctx.send` raising errors, added check for return values and `send_private_embed` call. | |||
| * | (Moderation Utils Tests): Added following new assertions to ↵ | 2020-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` ↵ | 2020-03-05 | -2/+1 | |
| | | | | | instead creating new one | |||
| * | (Moderation Utils Tests): Removed unnecessary `AsyncMock()` from `__init__` ↵ | 2020-03-05 | -1/+0 | |
| | | | | | (`self.bot.api_client.get`) | |||
| * | (Moderation Utils Tests): Moved `has_active_infraction` tests to one test. | 2020-03-05 | -22/+35 | |
| | | ||||
| * | (Moderation Utils Tests): `send_private_embed` moved exception creating from ↵ | 2020-03-05 | -4/+6 | |
| | | | | | cases testing to test cases listing, added side_effect resetting. | |||
| * | (Moderation Utils Tests): Created tests for `post_infraction` function, ↵ | 2020-03-05 | -1/+68 | |
| | | | | | created __init__.py for moderation tests | |||
| * | (Moderation Utils Tests): Created tests for `send_private_embed` function + ↵ | 2020-03-04 | -3/+44 | |
| | | | | | Fixed errors. | |||
| * | (Moderation Utils Tests): Created tests for `post_user` function. | 2020-03-04 | -1/+59 | |
| | | ||||
| * | (Moderation Utils Tests): Created tests for `notify_pardon` function. | 2020-03-04 | -2/+39 | |
| | | ||||
| * | (Moderation Utils Tests): Created tests for `notify_infraction` function. | 2020-03-04 | -2/+91 | |
| | | ||||
| * | (Moderation Utils Tests): Created tests for `has_active_infraction` function | 2020-03-03 | -0/+24 | |
| | | ||||
| * | (Moderation Utils Tests): Added imports, modified tests class instance and ↵ | 2020-03-03 | -5/+7 | |
| | | | | | created new params for tests class | |||
| * | Created file for moderation utils tests + added setUp to this. | 2020-03-03 | -0/+12 | |
| | | ||||
| * | Adding helpers to the Filtering whitelist | 2020-03-02 | -0/+1 | |
| | | | | Resolves an issue mentioned in https://github.com/python-discord/bot/issues/767, giving Helpers access to post invites and other things caught by the Filtering cog. | |||
| * | Merge pull request #783 from python-discord/python38-migration | 2020-03-01 | -661/+301 | |
| |\ | | | | | Migrate bot to Python 3.8 | |||
| | * | Merge branch 'master' into python38-migration | 2020-03-01 | -2/+29 | |
| | |\ | |/ |/| | ||||
| * | | Merge pull request #809 from python-discord/ban-grabify-urls | 2020-03-01 | -0/+24 | |
| |\ \ | | | | | | | Add grabify (IP logger) domains to banned domains | |||
| | * | | Add grabify (IP logger) domains to banned domains | 2020-03-01 | -0/+24 | |
| |/ / | ||||
| * | | Merge pull request #808 from spyoungtech/master | 2020-03-02 | -2/+5 | |
| |\ \ | | | | | | | Optimize Dockerfile for faster rebuilds | |||
| | * \ | Merge branch 'master' into master | 2020-03-02 | -0/+0 | |
| | |\ \ | |/ / |/| | | ||||
| | * | | Optimize Dockerfile | 2020-03-01 | -2/+5 | |
| | | | | ||||
| | | * | Modify log test regex to be non-os-specific | 2020-03-01 | -1/+1 | |
| | | | | | | | | | | Previous regex utilized a `/`, which doesn't work for comparing against Windows paths, which use `\` | |||
| | | * | Move syncer confirmation reaction check out of finally clause | 2020-03-01 | -11/+11 | |
| | | | | | | | | | | Returning directly out of a `finally` clause can cause any exceptions raised in the clause to be discarded, so we can remove the finally clause entirely and shift the control statements into the body of the function | |||
| | | * | Bump Dependencies & Relock | 2020-03-01 | -78/+76 | |
| | | | | | | | | | | * Remove explicit urllib3 pinning, CVE that caused its pinning has been resolved by 1.25+. This is a child dependency of requests. | |||
| | | * | Merge branch 'master' into python38-migration | 2020-03-01 | -29/+71 | |
| | | |\ | |_|/ |/| | | | | | I have resolved a merge conflict in Pipfile.lock by relocking with the newly added dependencies of `coloredlogs` and `colorama`. | |||
| * | | | Merge pull request #806 from python-discord/feat/frontend/b000/coloured-logs | 2020-03-01 | -47/+89 | |
| |\| | | | | | | | | Coloured log output | |||
| | * | | Make logs coloured! | 2020-02-29 | -7/+23 | |
| | | | | ||||
| | * | | Install the coloredlogs package | 2020-02-29 | -40/+66 | |
| |/ / | | | | | | | | | This makes it easy to add colour to the logs. Colorama is also installed if on a Windows system. | |||
| | * | Migrate snekbox tests to Python 3.8's unittest | 2020-02-29 | -41/+27 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've migrated the `tests/test_snekbox.py` file to use the new Python 3.8-style unittests instead of our old style using our custom Async mocks. In particular, I had to make a few changes: - Mocking the async post() context manager correctly Since `ClientSession.post` returns an async context manager when called, we need to make sure to assign the return value to the __aenter__ method of whatever `post()` returns, not of `post` itself (i.e.. when it's not called). - Use the new AsyncMock assert methods `assert_awaited_once` and `assert_awaited_once_with` Objects of the new `unittest.mock.AsyncMock` class have special methods to assert what they were called with that also assert that specific coroutine object was awaited. This means we test two things in one: Whether or not it was called with the right arguments and whether or not the returned coroutine object was then awaited. - Patch `functools.partial` as `partial` objects are compared by identity When you create two partial functions of the same function, you'll end up with two different `partial` objects. Since `partial` objects are compared by identity, you can't compare a `partial` created in a test method to that created in the callable you're trying to test. They will always compare as `False`. Since we're not interested in actually creating `partial` objects, I've just patched `functools.partial` in the namespace of the module we're testing to make sure we can compare them. | |||
| | * | Merge branch 'master' into python38-migration | 2020-02-29 | -403/+1005 | |
| | |\ | |/ |/| | | | I've resolved the merge conflict by confirming the deleted part of tests/helpers.py | |||