aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeLines
...
| | | | * | | | | Test `find_token_in_message` returns the found tokenGravatar MarkKoz2020-05-11-0/+24
| | | | | | | | |
| | | | * | | | | Test `find_token_in_message` returns None if no matches foundGravatar MarkKoz2020-05-11-0/+14
| | | | | | | | |
| | | | * | | | | 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
| |\ \ \ \ \ \ \
| * | | | | | | | Remove redis namespace collision testGravatar MarkKoz2020-05-31-10/+0
| | | | | | | | |
* | | | | | | | | Jam Tests: space out lines for readabilityGravatar MarkKoz2020-07-22-0/+6
| | | | | | | | |
* | | | | | | | | Jam Tests: remove default_args attributeGravatar MarkKoz2020-07-22-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kind of redundant since it's only used by two tests.
* | | | | | | | | Jam Tests: re-arrange tests to follow definition order in the cogGravatar MarkKoz2020-07-22-10/+10
| | | | | | | | |
* | | | | | | | | Jam Tests: fix utils patchGravatar MarkKoz2020-07-22-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stop needs to be called on the patcher, not the mock. Furthermore, using addCleanup is safer than tearDown because the latter may not be called if an exception is raised in setUp.
* | | | | | | | | Jam Tests: Fix `test_duplicate_member_provided` assertionsGravatar ks1292020-06-13-1/+3
| | | | | | | | |
* | | | | | | | | Jam Tests: Fix wrong function name and convert them to mocksGravatar ks1292020-06-13-1/+3
| | | | | | | | |
* | | | | | | | | Jam Tests: Simplify and make tests more secureGravatar ks1292020-06-13-6/+4
| | | | | | | | |
* | | | | | | | | Jam Tests: Update `Context` to `Guild` for tests tooGravatar ks1292020-06-13-19/+19
| | | | | | | | |
* | | | | | | | | Jam Tests: Apply recent command splitting to `test_jam_roles_adding`Gravatar ks1292020-06-11-2/+2
| | | | | | | | |
* | | | | | | | | Jam Tests: Remove unnecessary `Context` mock resetsGravatar ks1292020-06-11-2/+0
| | | | | | | | |
* | | | | | | | | Jam Tests: Implement default argumentsGravatar ks1292020-06-11-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid repeating same arguments, added default arguments that is unpacked on function call.
* | | | | | | | | Jam Tests: Apply recent changes to `test_category_dont_exist`Gravatar ks1292020-06-11-2/+1
| | | | | | | | |
* | | | | | | | | Jam Tests: Simplify and update `test_category_channel_exist`Gravatar ks1292020-06-11-3/+1
| | | | | | | | |
* | | | | | | | | Jam Tests: Merge text and voice channel creation testsGravatar ks1292020-06-11-21/+24
| | | | | | | | |
* | | | | | | | | Jam Tests: Apply recent changes to overwrites testGravatar ks1292020-06-11-2/+1
| | | | | | | | |
* | | | | | | | | Jam Tests: Add more assertions to result message sending testGravatar ks1292020-06-11-1/+7
| | | | | | | | |
* | | | | | | | | Jam Tests: Make early exiting test more secureGravatar ks1292020-06-11-2/+6
| | | | | | | | |
* | | | | | | | | Jam Tests: Use class member of patch instead decorator on most of testsGravatar ks1292020-06-11-21/+19
| | | | | | | | |
* | | | | | | | | Jam Tests: Fix `test_result_sending` docstringGravatar ks1292020-06-11-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Mark <[email protected]>
* | | | | | | | | Jam Tests: Create test for `setup` functionGravatar ks1292020-06-11-1/+11
| | | | | | | | |
* | | | | | | | | Jam Tests: Create test for successful `ctx.send` callingGravatar ks1292020-06-11-0/+6
| | | | | | | | |
* | | | | | | | | Jam Tests: Create test for team jam roles addingGravatar ks1292020-06-11-0/+14
| | | | | | | | |
* | | | | | | | | Jam Tests: Create test for team voice channel creatingGravatar ks1292020-06-11-0/+12
| | | | | | | | |
* | | | | | | | | Jam Tests: Make text channel creation test more specificGravatar ks1292020-06-11-1/+8
| | | | | | | | |