diff options
| author | 2020-05-07 16:46:32 +0200 | |
|---|---|---|
| committer | 2020-05-07 16:46:32 +0200 | |
| commit | 5b11b248b945cd2a732c6d8d430d117fc062cc8d (patch) | |
| tree | 2d2b2fb082f6a0ffca7d5ee477253454aae4623c /tests | |
| parent | Log unexpected JSON responses. (diff) | |
Remove tests from moved function.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/cogs/test_snekbox.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/bot/cogs/test_snekbox.py b/tests/bot/cogs/test_snekbox.py index 1dec0ccaf..d32d80ead 100644 --- a/tests/bot/cogs/test_snekbox.py +++ b/tests/bot/cogs/test_snekbox.py @@ -1,5 +1,4 @@ import asyncio -import logging import unittest from unittest.mock import AsyncMock, MagicMock, Mock, call, create_autospec, patch @@ -53,20 +52,6 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase): raise_for_status=True ) - async def test_upload_output_gracefully_fallback_if_exception_during_request(self): - """Output upload gracefully fallback if the upload fail.""" - resp = MagicMock() - resp.json = AsyncMock(side_effect=Exception) - self.bot.http_session.post().__aenter__.return_value = resp - - log = logging.getLogger("bot.cogs.snekbox") - with self.assertLogs(logger=log, level='ERROR'): - await self.cog.upload_output('My awesome output!') - - async def test_upload_output_gracefully_fallback_if_no_key_in_response(self): - """Output upload gracefully fallback if there is no key entry in the response body.""" - self.assertEqual((await self.cog.upload_output('My awesome output!')), None) - def test_prepare_input(self): cases = ( ('print("Hello world!")', 'print("Hello world!")', 'non-formatted'), |