aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
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-12Incidents tests: write tests for module-level helpersGravatar kwzrd-0/+135