diff options
author | 2020-05-22 08:43:10 +0300 | |
---|---|---|
committer | 2020-05-22 08:43:10 +0300 | |
commit | ededd1879cfb914445342b202d4c66aed23ee94b (patch) | |
tree | de45dde2e63cdb4225c8e19b1c8e405af09892b5 | |
parent | Merge branch 'master' into logging-tests (diff) |
Logging Tests: Simplify `DEBUG_MODE` `False` test
- Remove embed attributes checks
- Replace `self.dev_log.assert_awaited_once_with` with `self.dev_log.assert_awaited_once`.
-rw-r--r-- | tests/bot/cogs/test_logging.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/bot/cogs/test_logging.py b/tests/bot/cogs/test_logging.py index ba98a5a56..8a18fdcd6 100644 --- a/tests/bot/cogs/test_logging.py +++ b/tests/bot/cogs/test_logging.py @@ -22,17 +22,7 @@ class LoggingTests(unittest.IsolatedAsyncioTestCase): await self.cog.startup_greeting() self.bot.wait_until_guild_available.assert_awaited_once_with() self.bot.get_channel.assert_called_once_with(constants.Channels.dev_log) - - embed = self.dev_log.send.call_args[1]['embed'] - self.dev_log.send.assert_awaited_once_with(embed=embed) - - self.assertEqual(embed.description, "Connected!") - self.assertEqual(embed.author.name, "Python Bot") - self.assertEqual(embed.author.url, "https://github.com/python-discord/bot") - self.assertEqual( - embed.author.icon_url, - "https://raw.githubusercontent.com/python-discord/branding/master/logos/logo_circle/logo_circle_large.png" - ) + self.dev_log.send.assert_awaited_once() @patch("bot.cogs.logging.DEBUG_MODE", True) async def test_debug_mode_true(self): |