aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Matteo <[email protected]>2020-02-27 11:47:01 +0100
committerGravatar Matteo <[email protected]>2020-02-27 11:47:01 +0100
commitafc74faadd5fb4d3fd3003bed9f2a1f241c0dc58 (patch)
tree6896e81829e023203ca0d00c9ef9d7976a214580 /tests
parentSplit the eval command procedure into two functions. (diff)
Use unicode code point instead of literal for the snekbox re-eval emoji
Unicode literals aren't really safe compared to code points
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/test_snekbox.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bot/cogs/test_snekbox.py b/tests/bot/cogs/test_snekbox.py
index c1c0f8d47..e7a1e3362 100644
--- a/tests/bot/cogs/test_snekbox.py
+++ b/tests/bot/cogs/test_snekbox.py
@@ -303,7 +303,7 @@ class SnekboxTests(unittest.TestCase):
call('message_edit', partial(snekbox.predicate_eval_message_edit, ctx), timeout=10),
call('reaction_add', partial(snekbox.predicate_eval_emoji_reaction, ctx), timeout=10)
)
- ctx.message.add_reaction.assert_called_once_with('🔁')
+ ctx.message.add_reaction.assert_called_once_with(snekbox.REEVAL_EMOJI)
ctx.message.clear_reactions.assert_called_once()
response.delete.assert_called_once()
@@ -336,12 +336,12 @@ class SnekboxTests(unittest.TestCase):
def test_predicate_eval_emoji_reaction(self):
"""Test the predicate_eval_emoji_reaction function."""
valid_reaction = MockReaction(message=MockMessage(id=1))
- valid_reaction.__str__.return_value = '🔁'
+ valid_reaction.__str__.return_value = snekbox.REEVAL_EMOJI
valid_ctx = MockContext(message=MockMessage(id=1), author=MockUser(id=2))
valid_user = MockUser(id=2)
invalid_reaction_id = MockReaction(message=MockMessage(id=42))
- invalid_reaction_id.__str__.return_value = '🔁'
+ invalid_reaction_id.__str__.return_value = snekbox.REEVAL_EMOJI
invalid_user_id = MockUser(id=42)
invalid_reaction_str = MockReaction(message=MockMessage(id=1))
invalid_reaction_str.__str__.return_value = ':longbeard:'