| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
| |
tested rule
|
| |
|
|
| |
in the sum of attachments
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Testing methodology was adjusted in upstream repo. Merging the relevant changes.
|
| | |\
| | |
| | |
| | |
| | | |
Enhancements for `tests.helpers` and our test suite
Co-authored-by: null <[email protected]>
|
| | | |\
| | |/
| |/| |
|
| | |\ \
| | | |
| | | | |
Forward pings in checkpoint to mod-alerts and reword periodic checkpoint ping
|
| | | |\ \
| | |/ /
| |/| | |
|
| | | | |
| | | |
| | | |
| | | | |
Unindent subsequent lines after check
|
| | | | |
| | | |
| | | |
| | | | |
[kaizen] limit on_message listener to verification channel
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, the coroutine object passed to `MockBot.loop.create_task`
would trigger a `RuntimeWarning` for not being awaited as we do not
actually create a task for it. To prevent these warnings, coroutine
objects passed will now automatically be closed.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Our custom `discord.py` now follow the specifications of the object
they are mocking more strictly by using the `spec_set` instead of the
`spec` kwarg to initialize the specifications. This means that trying
to set an attribute that does not follow the specifications will now
also result in an `AttributeError`.
To make sure we are not trying to set illegal attributes during the
default initialization of the mock objects, I've changed the way we
handle default values of parameters. This does introduce a breaking
change: Instead of passing a `suffix_id`, the `id` attribute should
now be passed using the exact name. `id`.
This commit also makes sure existing tests follow this change.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `name` keyword argument has a special meaning for the default
mockobjects provided by `unittest.mock`. This means that by default,
the common d.py `name` attribute can't be set during initalization of
one of our custom Mock-objects by passing it to the constructor.
Since it's unlikely for us to make use of the special `name` feature
of mocks and more likely to want to set the d.py `name` attribute, I
added special handling of the `name` kwarg.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, logging messages would output to std.out. when running
individual test files (instead of running the entire suite). To
prevent this, I've added a `for`-loop to `tests.helpers` that sets
the level of all registered loggers to `CRITICAL`.
The reason for adding this to `tests.helpers` is simple: It's the
most common file to be imported in individual tests, increasing the
chance of the code being run for individual test files.
A small downside of this way of handling logging is that when we are
trying to assert logging messages are being emitted, we need to set
the logger explicitly in the `self.assertLogs` context manager. This
is a small downside, though, and probably good practice anyway.
There was one test in `tests.bot.test_api` that did not do this, so
I have changed this to make the test compatible with the new set-up.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| | | |
| | | | |
Add unit test for links antispam rule
|
| | |\ \ \
| |/ / /
|/| | | |
|
| |\ \ \ \
| |_|_|/
|/| | | |
Allow helpers to nominate people
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| |_|/
|/| | |
Schedule superstarify infractions for expiration
|
| | |\ \
| |/ /
|/| | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
User command enhancements
Co-authored-by: null <[email protected]>
|
| | |\ \ \
| |/ / /
|/| | | |
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | | |
Show custom statuses in !user output
|
| | |\ \ \ \
| |/ / / /
|/| | | | |
|
| |\ \ \ \ \
| | | | | |
| | | | | | |
Write tests for `bot.utils`.
|
| | |\ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove redirection on rules command
|
| | |\ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously restricted for the staff. This change was suggested due its possible usefulness for regular users.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Closes #604.
|
| | |_|/ / / /
|/| | | | |
| | | | | |
| | | | | | |
Resolves #647
|
| |\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Use timedelta to correctly calculate next midnight
|
| |/ / / / / |
|
| | |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/python-discord/bot/issues/628
https://github.com/python-discord/bot/issues/339
This commit introduces several changes to the output of the `!user`
command for moderation staff. The output for regular users has not
changed.
Changes:
- When issued in a moderation channel, the infraction count of the
user will now be broken down by type as described in #339. This
allows moderators to get a quicker overview of someone's history by
providing more information. The command will display the total
number of infractions per type, with the number of active
infractions in parentheses behind it if there are any.
This change also means that there no longer a need for the `hidden`
parameter: When issued in a moderation channel, hidden infractions
are included by default; when issued outside of a mod channel, the
command will be equal to what a regular user would get.
In addition to broken-down infraction info, the command now also
shows information about the nominations of a user when it's issued
inside of a moderation channel.
- The code has been refactored to smaller units that take care of a
single action to make unit testing easier. I have included tests
that cover the command and all of the new helper methods. Tests for
the other methods/commands in the cog will be added in the specific
issue calling for tests for this cog (#581)
This commit closes #628 and closes #339
|
| | | | | |
|
| | | | | |
|
| | | | | |
|