aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-06-19Incidents tests: write tests for `crawl_incidents`Gravatar kwzrd-0/+58
2020-06-19Incidents tests: add helper for mocking async for-loopsGravatar kwzrd-0/+37
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.
2020-06-18Incidents tests: write tests for `process_event`Gravatar kwzrd-1/+101
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.
2020-06-17Update deletion scheduler to use latest watchlist configurationGravatar Joseph Banks-17/+5
2020-06-17Add LMGTFY to domain blacklistGravatar Joseph Banks-0/+1
2020-06-16Format parameters with a more consistent styleGravatar MarkKoz-19/+19
2020-06-16Add optional type annotations to reason in pardon funcsGravatar MarkKoz-2/+2
2020-06-16Revise inaccurate typehint for Optional reasonGravatar kosayoda-18/+31
2020-06-16Revise inaccurate docstring in RedisCacheGravatar kosayoda-2/+2
2020-06-16Refactor nested if-statementGravatar kosayoda-5/+4
2020-06-15Log exception info for failed attachment uploadsGravatar MarkKoz-1/+1
2020-06-15Update bot/resources/tags/customcooldown.mdGravatar Daniel Nash-3/+1
Co-authored-by: Mark <[email protected]>
2020-06-14Fix check for bot actor in infractionsGravatar MarkKoz-4/+4
The reason None check should be nested to avoid affecting the else/elif statements that follow.
2020-06-14Check infraction reason isn't None before shortening itGravatar MarkKoz-5/+8
2020-06-15Add the C# guild to the whitelistGravatar Dennis Pham-0/+1
2020-06-13Incidents tests: write tests for `make_confirmation_task`Gravatar kwzrd-0/+35
2020-06-13Incidents tests: write tests for `on_message`Gravatar kwzrd-0/+27
2020-06-13Incidents tests: test non-404 error responseGravatar kwzrd-0/+20
2020-06-13Incidents: log error on non-404 responseGravatar kwzrd-2/+3
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.
2020-06-13Incidents tests: write tests for `resolve_message`Gravatar kwzrd-0/+56
2020-06-13Incidents tests: move `mock_404` into module namespaceGravatar kwzrd-5/+6
This will be useful for others tests as well.
2020-06-13Incidents tests: write tests for `archive`Gravatar kwzrd-2/+63
2020-06-13Incidents tests: set up base class for `Incidents`Gravatar kwzrd-2/+21
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.
2020-06-13Incidents tests: improve mock `Signal` name & move defGravatar kwzrd-6/+6
Let's make it clear that this is our own mock. We also move the definition to the top of the module.
2020-06-13Incidents tests: use our own helper mocksGravatar kwzrd-16/+14
No reason to build own MagicMocks as we already have helpers that more accurately mimic the mocked behaviour.
2020-06-12Escape markdown in charinfo embedGravatar MarkKoz-2/+2
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
2020-06-12Incidents tests: write tests for module-level helpersGravatar kwzrd-0/+135