| Commit message (Collapse) | Author | Lines |
|
Suggested by Mark during review.
Co-authored-by: MarkKoz <[email protected]>
|
|
Pointed out by Mark during review that this is unnecessary, as logging
using `exception` automatically appends the `exc_info` of the handled
exception when done in an except block.
Co-authored-by: MarkKoz <[email protected]>
|
|
This is way too spacious for how little is happening here.
Suggested by ks129.
Co-authored-by: ks129 <[email protected]>
|
|
Caught during review by ks129.
Co-authored-by: ks129 <[email protected]>
|
|
This was originally in place to silence a PyCharm warning regarding
accessing the private attributes.
However, since there is no corresponding error code to specify,
the noqa will silence any linter warning, which is potentially
dangerous, and seems to be bad practice.
|
|
Logs useful when observing the internals but too verbose for DEBUG are
reduced to TRACE.
|
|
|
|
|
|
See the docstring. This does not make the ambition to be powerful
enough to be included in `tests.helpers`, and is only intended
for local purposes.
|
|
This also breaks the helpers import statement into a vertical list,
as the amount of imports has grown too much. I still believe that
this is a preferred alternative to accessing the helpers via module
namespace, as we use them a lot, and the added visual noise would
be annoying to read - their names are already descriptive enough.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Mark <[email protected]>
|
|
The reason None check should be nested to avoid affecting the else/elif
statements that follow.
|
|
|
|
|
|
|
|
|
|
|
|
We do not wish to log 404 exceptions as those are expected, however,
if something else goes wrong, we shouldn't silence it.
This also removes the explicit None return as it only adds syntax
noise.
|
|
|
|
This will be useful for others tests as well.
|
|
|
|
For cleanliness, I've decided to make a separate class for each method.
Since most tests will want to have an `Incident` instance ready, they
can inherit the `setUp` from `TestIncidents`, which does not make any
assertions on its own.
|
|
Let's make it clear that this is our own mock. We also move the
definition to the top of the module.
|
|
No reason to build own MagicMocks as we already have helpers that
more accurately mimic the mocked behaviour.
|
|
The embed displays the original character. If it's a markdown char,
it would interfere with the embed's actual markdown. The backtick was
especially troublesome.
Fixes #996
|
|
|