aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
...
| | | * | Fix test for token remover ignoring bot messagesGravatar MarkKoz2020-05-11-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not possible to test this via asserting the return value of `on_message` since it never returns anything. Instead, the actual relevant unit, `find_token_in_message,` should be tested.
| | | * | Allow using arbitrary parameter names with the autospec decoratorGravatar MarkKoz2020-05-11-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | This gives the caller more flexibility. Sometimes attribute names are too long or they don't follow a naming scheme accepted by the linter.
| | | * | Test token remover skips messages without tokensGravatar MarkKoz2020-05-11-0/+11
| | | | |
| | | * | Test token remover takes action if a token is foundGravatar MarkKoz2020-05-11-1/+13
| | | | |
| | | * | Add a test helper function to patch multiple attributes with autospecsGravatar MarkKoz2020-05-11-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helper reduces redundancy/boilerplate by setting default values. It also has the consequence of shortening the length of the invocation, which makes it faster to use and easier to read.
| | | * | Test on_message_edit of token remover uses on_messageGravatar MarkKoz2020-05-11-2/+10
| | | | |
| | * | | Merge pull request #978 from ItsDrike/unsilence-schedulerGravatar Mark2020-06-12-4/+14
| | |\ \ \ | | | | | | | | | | | | Use Scheduler instead of asyncio.sleep on silence cog
| | | * | | Test for channel not silenced messageGravatar ItsDrike2020-06-06-4/+14
| | | | | |
| * | | | | Merge branch 'master' into help_channel_rediscacheGravatar Leon Sandøy2020-06-06-9/+8
| |\ \ \ \ \
| * | | | | | Add support for bool values in RedisCacheGravatar Leon Sandøy2020-05-31-1/+3
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | We're gonna need this for the help channel handling, and it seems like a reasonable type to support anyway. It requires a tiny bit of special handling, but nothing outrageous.
* | | | | | Incidents tests: write tests for `process_event`Gravatar kwzrd2020-06-18-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.
* | | | | | Incidents tests: write tests for `make_confirmation_task`Gravatar kwzrd2020-06-13-0/+35
| | | | | |
* | | | | | Incidents tests: write tests for `on_message`Gravatar kwzrd2020-06-13-0/+27
| | | | | |
* | | | | | Incidents tests: test non-404 error responseGravatar kwzrd2020-06-13-0/+20
| | | | | |
* | | | | | Incidents tests: write tests for `resolve_message`Gravatar kwzrd2020-06-13-0/+56
| | | | | |
* | | | | | Incidents tests: move `mock_404` into module namespaceGravatar kwzrd2020-06-13-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This will be useful for others tests as well.
* | | | | | Incidents tests: write tests for `archive`Gravatar kwzrd2020-06-13-2/+63
| | | | | |
* | | | | | Incidents tests: set up base class for `Incidents`Gravatar kwzrd2020-06-13-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.
* | | | | | Incidents tests: improve mock `Signal` name & move defGravatar kwzrd2020-06-13-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's make it clear that this is our own mock. We also move the definition to the top of the module.
* | | | | | Incidents tests: use our own helper mocksGravatar kwzrd2020-06-13-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason to build own MagicMocks as we already have helpers that more accurately mimic the mocked behaviour.
* | | | | | Incidents tests: write tests for module-level helpersGravatar kwzrd2020-06-12-0/+135
| | | | | |
* | | | | | Incidents tests: create new test moduleGravatar kwzrd2020-06-12-0/+0
| |_|/ / / |/| | | |
* | | | | Merge branch 'master' into bad-words-nickGravatar ks1292020-06-11-60/+317
|\ \ \ \ \
| * \ \ \ \ Merge branch 'master' into bug/backend/906/converter-year-rangeGravatar Joseph Banks2020-06-10-47/+824
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | Merge branch 'master' into staff_count_serverGravatar kwzrd2020-06-05-5/+0
| | |\ \ \ \ | | | | |_|/ | | | |/| |
| | | * | | Merge branch 'master' into stop_sending_avatar_hashGravatar Leon Sandøy2020-05-31-31/+638
| | | |\| |
| | | * | | Fix failing tests related to avatar_hashGravatar Leon Sandøy2020-05-27-5/+0
| | | | | |
| | * | | | Merge branch 'master' into staff_count_serverGravatar Leon Sandøy2020-05-31-0/+247
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | Merge branch 'master' into ban-kick-reason-lengthGravatar Mark2020-05-30-31/+550
| | | |\ \ \
| | | | * \ \ Merge branch 'master' into test_antimalwareGravatar Sebastiaan Zeeff2020-05-30-35/+398
| | | | |\ \ \
| | | | * | | | AntiMalware tests - Switched from monkeypatch to unittest.patchGravatar Jannes Jonkers2020-05-25-2/+2
| | | | | | | |
| | | | * | | | AntiMalware Refactor - Moved embed descriptions into constants, added tests ↵Gravatar Jannes Jonkers2020-05-11-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for embed descriptions
| | | | * | | | AntiMalware Tests - Removed exact log content checksGravatar Jannes Jonkers2020-05-11-19/+2
| | | | | | | |
| | | | * | | | AntiMalware Tests - added a missing case for no extensions in ↵Gravatar Jannes Jonkers2020-05-11-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_get_disallowed_extensions
| | | | * | | | AntiMalware Tests - extracted the method for determining disallowed ↵Gravatar Jannes Jonkers2020-05-11-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extensions and added a test for it.
| | | | * | | | AntiMalware Tests - implemented minor feedbackGravatar Jannes Jonkers2020-05-11-12/+12
| | | | | | | |
| | | | * | | | Update tests/bot/cogs/test_antimalware.pyGravatar MrGrote2020-05-08-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Mark <[email protected]>
| | | | * | | | AntiMalware Tests - Switched to unittest.IsolatedAsyncioTestCaseGravatar Jannes Jonkers2020-05-07-29/+19
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest for txt file attachmentGravatar Jannes Jonkers2020-05-07-2/+23
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest for valid attachmentGravatar Jannes Jonkers2020-05-07-0/+9
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest message deletion logGravatar Jannes Jonkers2020-05-07-4/+28
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest for cog setupGravatar Jannes Jonkers2020-05-07-0/+10
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest for messages that were deleted in the ↵Gravatar Jannes Jonkers2020-05-07-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | meantime.
| | | | * | | | AntiMalware Tests - Added unittest for the embed for a python file.Gravatar Jannes Jonkers2020-05-07-1/+24
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest for messages send by staffGravatar Jannes Jonkers2020-05-07-1/+12
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittests for deletion of message and ignoring of dmsGravatar Jannes Jonkers2020-05-07-1/+21
| | | | | | | |
| | | | * | | | AntiMalware Tests - Added unittest for message without attachmentGravatar Jannes Jonkers2020-05-07-0/+20
| | | | | |_|/ | | | | |/| |
| | | * | | | Infr. Tests: Add `apply_infraction` awaiting assertion with argsGravatar ks1292020-05-30-0/+6
| | | | | | |
| | | * | | | Simplify infraction reason truncation testsGravatar ks1292020-05-30-13/+7
| | | | | | |
| | | * | | | Infr Tests: Make `get_active_infraction` return `None`Gravatar ks1292020-05-20-1/+1
| | | | | | |