| Commit message (Collapse) | Author | Age | Lines | ||
|---|---|---|---|---|---|
| ... | |||||
| | | * | | | | Create test for voice unban fail send DM | 2020-10-11 | -0/+15 | ||
| | | | | | | | |||||
| | | * | | | | Create base test for voice unban | 2020-10-11 | -0/+18 | ||
| | | | | | | | |||||
| | | * | | | | Create test for voice ban pardon when user not found | 2020-10-11 | -0/+7 | ||
| | | | | | | | |||||
| | | * | | | | Shorten voice ban reason and create test for it | 2020-10-11 | -0/+17 | ||
| | | | | | | | |||||
| | | * | | | | Add Voice Ban test about calling apply_infraction | 2020-10-11 | -0/+15 | ||
| | | | | | | | |||||
| | | * | | | | Create test for voice ban applying role remove ignore. | 2020-10-11 | -0/+15 | ||
| | | | | | | | |||||
| | | * | | | | Check arguments for get_active_infraction in voice ban tests | 2020-10-11 | -1/+1 | ||
| | | | | | | | |||||
| | | * | | | | Create test to check does this pass proper kwargs to infraction posting | 2020-10-11 | -0/+12 | ||
| | | | | | | | |||||
| | | * | | | | Create test for case when posting infraction fails | 2020-10-11 | -1/+12 | ||
| | | | | | | | |||||
| | | * | | | | Create test for case when user already have active Voice Ban | 2020-10-11 | -2/+11 | ||
| | | | | | | | |||||
| | | * | | | | Create test for case when trying to voice ban user who haven't passed gate | 2020-10-11 | -2/+11 | ||
| | | | | | | | |||||
| | | * | | | | Create test for voice unban | 2020-10-11 | -0/+6 | ||
| | | | | | | | |||||
| | | * | | | | Create test for temporary voice ban | 2020-10-11 | -1/+7 | ||
| | | | | | | | |||||
| | | * | | | | Create test for permanent voice ban | 2020-10-11 | -0/+17 | ||
| | | | |/ / | | |/| | | |||||
| | * | | | | Silence tests: update docstrings in notifier tests | 2020-10-21 | -2/+2 | ||
| | | | | | | |||||
| | * | | | | Silence: rename function to reduce ambiguity | 2020-10-18 | -8/+8 | ||
| | | | | | | |||||
| | * | | | | Silence: require only 1 permission to be False for a manual unsilence | 2020-10-09 | -0/+2 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, both sending messages and adding reactions had to be false in order for the manual unsilence failure message to be sent. Because staff may only set one of these manually, the message should be sent if at least one of the permissions is set. | ||||
| | * | | | | Merge master, fix conflicts, and create redis session in silence tests | 2020-10-09 | -1620/+1015 | ||
| | |\| | | | |||||
| | * | | | | Silence tests: make _async_init attribute tests more robust | 2020-10-08 | -7/+11 | ||
| | | | | | | |||||
| | * | | | | Silence: remove _mod_log_channel attribute | 2020-10-08 | -1/+1 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's only used as an argument to `SilenceNotifier`, so it doesn't need to be an instance attribute. | ||||
| | * | | | | Silence: add to notifier when indefinite rather than temporary | 2020-10-08 | -6/+6 | ||
| | | | | | | | | | | | | | | | | | | | | | Accidentally swapped the logic in a previous commit during a refactor. | ||||
| | * | | | | Silence tests: fix unawaited coro warnings | 2020-10-07 | -2/+7 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because the Scheduler is mocked, it doesn't actually do anything with the coroutines passed to the schedule() functions, hence the warnings. | ||||
| | * | | | | Silence: rename _init_cog to _async_init | 2020-10-06 | -13/+13 | ||
| | | | | | | |||||
| | * | | | | Silence: refactor _silence | 2020-10-06 | -16/+22 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename to `_silence_overwrites` * Reduce responsibilities to only setting permission overwrites * Log in `silence` instead * Add to notifier in `silence` instead | ||||
| | * | | | | Silence: cancel init task when cog unloads | 2020-08-18 | -2/+5 | ||
| | | | | | | |||||
| | * | | | | Silence: rename caches | 2020-08-18 | -20/+20 | ||
| | | | | | | |||||
| | * | | | | Silence tests: remove unnecessary spec_set args | 2020-08-18 | -3/+3 | ||
| | | | | | | | | | | | | | | | | | | | | | It's not really necessary to set to True when mocking functions. | ||||
| | * | | | | Silence tests: more accurately assert the silence cmd schedule a task | 2020-08-18 | -3/+7 | ||
| | | | | | | |||||
| | * | | | | Silence tests: add a test for rescheduling active silences | 2020-08-18 | -0/+29 | ||
| | | | | | | |||||
| | * | | | | Silence tests: test the rescheduler unsilences expired silences | 2020-08-18 | -0/+14 | ||
| | | | | | | |||||
| | * | | | | Silence tests: test the rescheduler adds permanent silence to notifier | 2020-08-18 | -0/+14 | ||
| | | | | | | |||||
| | * | | | | Silence tests: test the scheduler skips missing channels | 2020-08-18 | -0/+25 | ||
| | | | | | | |||||
| | * | | | | Silence tests: add a test for _init_cog rescheduling unsilences | 2020-08-18 | -0/+7 | ||
| | | | | | | |||||
| | * | | | | Silence tests: remove _reschedule patch for cog tests | 2020-08-18 | -4/+0 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They don't do anything because they patch the class rather than the instance. It's too late for patching the instance to work since the `setUp` fixture, which instantiates the cog, executes before the patches do. Patching `setUp` would work (and its done in the other test cases), but some tests in this case will need the unpatched function too. Patching it doesn't serve much benefit to most tests anyway, so it's not worth the effort trying to make them work where they aren't needed. | ||||
| | * | | | | Silence tests: access everything via the silence module | 2020-08-18 | -24/+23 | ||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The module is imported anyway to keep imports short and clean. Using it in patch targets is shorter and allows for the two imports from the module to be removed. | ||||
| | * | | | | 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 | ||
| | | | | | | |||||