aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Matteo <[email protected]>2020-02-18 18:38:24 +0100
committerGravatar Matteo <[email protected]>2020-02-18 18:38:24 +0100
commitc1a998ca246e153333438ff91bce200bf74cc0f5 (patch)
tree399fa1e08d7b1d3b3e0b8fb231ac6d3026719cb5 /tests
parentUse a space instead of an empty string in test_get_status_emoji (diff)
Assert return value of Snekbox.post_eval
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/test_snekbox.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/bot/cogs/test_snekbox.py b/tests/bot/cogs/test_snekbox.py
index 94ff685c4..cf07aad71 100644
--- a/tests/bot/cogs/test_snekbox.py
+++ b/tests/bot/cogs/test_snekbox.py
@@ -25,7 +25,9 @@ class SnekboxTests(unittest.TestCase):
@async_test
async def test_post_eval(self):
"""Post the eval code to the URLs.snekbox_eval_api endpoint."""
- await self.cog.post_eval("import random")
+ self.mocked_post.json.return_value = {'lemon': 'AI'}
+
+ self.assertEqual(await self.cog.post_eval("import random"), {'lemon': 'AI'})
self.bot.http_session.post.assert_called_once_with(
URLs.snekbox_eval_api,
json={"input": "import random"},