aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-11-16 17:04:27 +0100
committerGravatar GitHub <[email protected]>2019-11-16 17:04:27 +0100
commite67822a46621d20ff0a1a27de1322b14432e4eb9 (patch)
treea77e6b4f53482185caef55dbf93aa9fb7f381604
parentAdd unit tests with full coverage for `bot.cogs.duck_pond` (diff)
Apply suggestions from code review
Co-Authored-By: Mark <[email protected]>
-rw-r--r--tests/bot/cogs/test_duck_pond.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/bot/cogs/test_duck_pond.py b/tests/bot/cogs/test_duck_pond.py
index ceefc286f..8f0c4f068 100644
--- a/tests/bot/cogs/test_duck_pond.py
+++ b/tests/bot/cogs/test_duck_pond.py
@@ -269,7 +269,7 @@ class DuckPondTests(base.LoggingTestCase):
self._get_reaction(emoji=self.duck_pond_emoji, staff=3, nonstaff=2),
self._get_reaction(emoji=self.unicode_duck_emoji, staff=4, nonstaff=9),
]),
- 3+4
+ 3 + 4
),
)
@@ -310,7 +310,6 @@ class DuckPondTests(base.LoggingTestCase):
@helpers.async_test
async def test_relay_message_to_duck_pond_handles_send_attachments_exceptions(self, send_attachments, send_webhook):
"""The `relay_message_to_duck_pond` method should handle exceptions when calling `send_attachment`."""
-
message = helpers.MockMessage(clean_content="message", attachments=["attachment"])
side_effects = (discord.errors.Forbidden(MagicMock(), ""), discord.errors.NotFound(MagicMock(), ""))
@@ -435,9 +434,9 @@ class DuckPondTests(base.LoggingTestCase):
async def test_on_raw_reaction_add_does_not_relay_below_duck_threshold(self, count_ducks, message_relay):
"""The `on_raw_reaction_add` listener should not relay messages or attachments below the duck threshold."""
test_cases = (
- (constants.DuckPond.threshold-1, False),
+ (constants.DuckPond.threshold - 1, False),
(constants.DuckPond.threshold, True),
- (constants.DuckPond.threshold+1, True),
+ (constants.DuckPond.threshold + 1, True),
)
channel, message, member, payload = self._raw_reaction_mocks(channel_id=3, message_id=4, user_id=5)