| Commit message (Collapse) | Author | Age | Lines |
... | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
replaced `.callback` calls with direct command awaits.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`unittest.TestCase` to `unittest.IsolatedAsyncTestCase` rest of test case classes.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`unittest.TestCase` to `unittest.IsolatedAsyncTestCase` in `InformationCogTests`.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
_syncers.py
|
| | | | | | | |
|
| | |\ \ \ \ \
| | | | |/ / /
| | | |/| | | |
|
| | | |\ \ \ \ |
|
| | | | |\ \ \ \ |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The confirmation was intended to be a safe guard against cache issues
that would cause a huge number of roles/users to deleted after syncing.
With `wait_until_guild_available`, such cache issue shouldn't arise.
Therefore, this feature is obsolete.
Resolve #1075
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
It's only used as an argument to `SilenceNotifier`, so it doesn't need
to be an instance attribute.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Accidentally swapped the logic in a previous commit during a refactor.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Because the Scheduler is mocked, it doesn't actually do anything with
the coroutines passed to the schedule() functions, hence the warnings.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* Rename to `_silence_overwrites`
* Reduce responsibilities to only setting permission overwrites
* Log in `silence` instead
* Add to notifier in `silence` instead
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
It's not really necessary to set to True when mocking functions.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
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.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
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.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Duplicating strings in assertions is redundant, closely coupled, and
less maintainable.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
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.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
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.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Reduce code redundancy by only defining them once.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Now that there are separate test cases, there's no need to keep the
fixtures separate.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Add a fixture to set up mocks for a successful `unsilence` call. This
reduces code redundancy.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|