diff options
| author | 2020-02-18 18:38:24 +0100 | |
|---|---|---|
| committer | 2020-02-18 18:38:24 +0100 | |
| commit | c1a998ca246e153333438ff91bce200bf74cc0f5 (patch) | |
| tree | 399fa1e08d7b1d3b3e0b8fb231ac6d3026719cb5 | |
| parent | Use a space instead of an empty string in test_get_status_emoji (diff) | |
Assert return value of Snekbox.post_eval
| -rw-r--r-- | tests/bot/cogs/test_snekbox.py | 4 |
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"}, |