| Commit message (Collapse) | Author | Age | Lines | ||
|---|---|---|---|---|---|
| ... | |||||
| | * | | | | | | Silence tests: add a subtest for the manual unsilence message | 2020-08-17 | -4/+7 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: assert against message constants | 2020-08-17 | -6/+7 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplicating strings in assertions is redundant, closely coupled, and less maintainable. | ||||
| | * | | | | | | Silence tests: also test that cache misses preserve other overwrites | 2020-08-17 | -12/+16 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: add a test for a mod alert on cache miss | 2020-08-17 | -0/+7 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: add a test for default overwrites on cache miss | 2020-08-17 | -4/+19 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a False for `add_reactions` in the mock overwrite rather than None to be sure the default (also None) is actually set for it. Fix channels set by `_init_cog` not being mocked properly. | ||||
| | * | | | | | | Silence tests: add a test for task cancellation | 2020-08-17 | -0/+5 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: add a test for deletion from the time cache | 2020-08-17 | -0/+5 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: add tests for scheduling tasks | 2020-08-17 | -0/+12 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: add a test for caching permanent times | 2020-08-17 | -0/+6 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: add a test for the time cache | 2020-08-17 | -0/+15 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix mock for _init_task | 2020-08-17 | -2/+4 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An `AsyncMock` fails because it returns a coroutine which may only be awaited once. However, an `asyncio.Future` is perfect because it is easy to create and can be awaited repeatedly, just like the actual `asyncio.Task` that is being mocked. | ||||
| | * | | | | | | Silence tests: create channel and overwrite in setUp for silence tests | 2020-08-17 | -29/+17 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce code redundancy by only defining them once. | ||||
| | * | | | | | | Silence tests: merge unsilence fixture into setUp | 2020-08-17 | -32/+20 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that there are separate test cases, there's no need to keep the fixtures separate. | ||||
| | * | | | | | | Silence tests: autospec _reschedule and SilenceNotifier for cog tests | 2020-08-17 | -4/+10 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: separate test cases; refactor names & docstrings | 2020-08-17 | -71/+95 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix tests for _unsilence | 2020-08-17 | -30/+45 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a fixture to set up mocks for a successful `unsilence` call. This reduces code redundancy. | ||||
| | * | | | | | | Silence tests: fix test_unsilence_private_removed_notifier | 2020-08-17 | -2/+5 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix overwrite preservation test for silences | 2020-08-17 | -11/+15 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix command message tests | 2020-08-17 | -15/+10 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix test_silence_private_for_false | 2020-08-17 | -4/+13 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix test_silence_private_silenced_channel | 2020-08-17 | -3/+10 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix test_silence_private_notifier | 2020-08-17 | -0/+3 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix test_unsilence_private_for_false | 2020-08-17 | -1/+4 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: fix silence cache test for overwrites | 2020-08-17 | -5/+8 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: replace obsolete cog_unload tests | 2020-08-17 | -13/+4 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moderation notifications are no longer sent so that doesn't need to be tested. | ||||
| | * | | | | | | Silence tests: rename test_instance_vars to test_init_cog | 2020-08-17 | -5/+5 | ||
| | | | | | | | | |||||
| | * | | | | | | Silence tests: mock RedisCaches | 2020-08-17 | -3/+2 | ||
| | | | | | | | | |||||
| | * | | | | | | Tests: optionally prevent autospec helper from passing mocks | 2020-08-17 | -19/+66 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not everything that's decorated needs the mocks that are patched. Being required to add the args to the test function anyway is annoying. It's especially bad if trying to decorate an entire test suite, as every test would need the args. Move the definition to a separate module to keep things cleaner. | ||||
| | * | | | | | | Silence: rename _get_instance_vars to _init_cog | 2020-08-16 | -4/+4 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a more accurate name since it also reschedules unsilences now. | ||||
| * | | | | | | | EH tests: Fix InWhitelistCheckFailure import path | 2020-09-27 | -1/+1 | ||
| | | | | | | | | |||||
| * | | | | | | | EH Tests: Fix order of imports | 2020-09-27 | -2/+2 | ||
| | | | | | | | | |||||
| * | | | | | | | Merge remote-tracking branch 'upstream/master' into error-handler-test | 2020-09-27 | -988/+2712 | ||
| |\ \ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | |||||
| | * | | | | | | Merge pull request #1161 from bast0006/feature-bast-user-token-notify | 2020-09-25 | -26/+124 | ||
| | |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | Add userid decoding and user token detection to the token removal moderation feature | ||||
| | | * | | | | | Remove redundant is_valid_userid function | 2020-09-25 | -19/+26 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extract_user_id(id) is not None does the same job and is not worth the extra function | ||||
| | | * | | | | | Change the mod alert message component for the user token detection | 2020-09-24 | -37/+14 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up mock usage, docstrings, unnecessarily split-lined function calls | ||||
| | | * | | | | | Add BOT vs USER token detection, properly handling bot tokens for bots in ↵ | 2020-09-24 | -8/+38 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current server Also adjust the naming and purposes of the format messages to KNOWN and UNKNOWN token messages. | ||||
| | | * | | | | | Implement review-suggested changes | 2020-09-24 | -33/+54 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | userid -> user ID maybevalid -> maybe_valid remove collections import and added a new function that handles the "format user ID log message" and should_ping_everyone feature | ||||
| | | * | | | | | Merge branch 'master' into feature-bast-user-token-notify | 2020-09-21 | -101/+462 | ||
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Resynchronize changes with the new cog folder arrangement | ||||
| | | * | | | | | | Make token_remover check basic HMAC validity (not low entropy) | 2020-09-19 | -5/+35 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handles cases like xxx.xxxxx.xxxxxxxx where a user has intentionally censored part of a token, and will not consider them "valid" | ||||
| | | * | | | | | | Add feature to token_remover: log detected user ID, and ping if it's a user ↵ | 2020-09-19 | -6/+39 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the server Updated tests This comes with a change that a user ID must actually be able to be decoded into an integer to be considered a valid token | ||||
| | * | | | | | | | Merge branch 'master' into feat/info/1125/user-cmd-whitelist-modmail | 2020-09-22 | -989/+599 | ||
| | |\ \ \ \ \ \ \ | |||||
| | | * \ \ \ \ \ \ | Merge branch 'master' into feat/frontend/533/mod-log-names | 2020-09-22 | -1019/+652 | ||
| | | |\ \ \ \ \ \ \ | | | | |_|_|_|/ / | | | |/| | | | | | |||||
| | | | * | | | | | | Merge branch 'master' into sebastiaan/features/use-async-rediscache-package | 2020-09-22 | -672/+491 | ||
| | | | |\ \ \ \ \ \ | |||||
| | | | | * \ \ \ \ \ | Merge branch 'master' into sebastiaan/bugs/duckpond | 2020-09-21 | -124/+491 | ||
| | | | | |\ \ \ \ \ \ | |||||
| | | | | | * \ \ \ \ \ | Merge pull request #1167 from Numerlor/eval-escape-paste | 2020-09-21 | -2/+2 | ||
| | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Upload eval output with codeblock escapes to pastebin | ||||
| | | | | | | * | | | | | | Accommodate new upload behaviour in tests | 2020-09-21 | -2/+2 | ||
| | | | | | | | | | | | | | |||||
| | | | | | * | | | | | | | Fix conflicts caused by #1103 | 2020-09-21 | -133/+538 | ||
| | | | | | |\ \ \ \ \ \ \ | | | | | | | |_|/ / / / | | | | | | |/| | | | | | | | | | | | | | | | | | Bunch of things were renamed, which mainly caused import conflicts. | ||||
| | | | | | | * | | | | | | Fix mod utils tests patch locations | 2020-09-21 | -4/+4 | ||
| | | | | | | | | | | | | | |||||
| | | | | | | * | | | | | | Fix import order of mod utils tests | 2020-09-21 | -1/+1 | ||
| | | | | | | | | | | | | | |||||
| | | | | | | * | | | | | | Fix import path of mod utils | 2020-09-21 | -1/+1 | ||
| | | | | | | | | | | | | | |||||