diff options
author | 2020-08-19 13:34:34 -0700 | |
---|---|---|
committer | 2020-08-19 13:34:34 -0700 | |
commit | 07084103cabb95f1af25890e0059a93244088010 (patch) | |
tree | c1609842902394a11c3a400e8089d14160371e95 | |
parent | Dynamically discover and load extensions upon startup (diff) |
Categorise most of the uncategorised extensions
-rw-r--r-- | bot/exts/backend/alias.py (renamed from bot/exts/alias.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/__init__.py | 0 | ||||
-rw-r--r-- | bot/exts/fun/duck_pond.py (renamed from bot/exts/duck_pond.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/off_topic_names.py (renamed from bot/exts/off_topic_names.py) | 0 | ||||
-rw-r--r-- | bot/exts/moderation/dm_relay.py (renamed from bot/exts/dm_relay.py) | 0 | ||||
-rw-r--r-- | tests/bot/exts/fun/__init__.py | 0 | ||||
-rw-r--r-- | tests/bot/exts/fun/test_duck_pond.py (renamed from tests/bot/exts/test_duck_pond.py) | 10 |
7 files changed, 5 insertions, 5 deletions
diff --git a/bot/exts/alias.py b/bot/exts/backend/alias.py index 77867b933..77867b933 100644 --- a/bot/exts/alias.py +++ b/bot/exts/backend/alias.py diff --git a/bot/exts/fun/__init__.py b/bot/exts/fun/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/bot/exts/fun/__init__.py diff --git a/bot/exts/duck_pond.py b/bot/exts/fun/duck_pond.py index 7021069fa..7021069fa 100644 --- a/bot/exts/duck_pond.py +++ b/bot/exts/fun/duck_pond.py diff --git a/bot/exts/off_topic_names.py b/bot/exts/fun/off_topic_names.py index ce95450e0..ce95450e0 100644 --- a/bot/exts/off_topic_names.py +++ b/bot/exts/fun/off_topic_names.py diff --git a/bot/exts/dm_relay.py b/bot/exts/moderation/dm_relay.py index 0d8f340b4..0d8f340b4 100644 --- a/bot/exts/dm_relay.py +++ b/bot/exts/moderation/dm_relay.py diff --git a/tests/bot/exts/fun/__init__.py b/tests/bot/exts/fun/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/bot/exts/fun/__init__.py diff --git a/tests/bot/exts/test_duck_pond.py b/tests/bot/exts/fun/test_duck_pond.py index f6d977482..704b08066 100644 --- a/tests/bot/exts/test_duck_pond.py +++ b/tests/bot/exts/fun/test_duck_pond.py @@ -7,11 +7,11 @@ from unittest.mock import AsyncMock, MagicMock, patch import discord from bot import constants -from bot.exts import duck_pond +from bot.exts.fun import duck_pond from tests import base from tests import helpers -MODULE_PATH = "bot.exts.duck_pond" +MODULE_PATH = "bot.exts.fun.duck_pond" class DuckPondTests(base.LoggingTestsMixin, unittest.IsolatedAsyncioTestCase): @@ -63,7 +63,7 @@ class DuckPondTests(base.LoggingTestsMixin, unittest.IsolatedAsyncioTestCase): self.bot.fetch_webhook.side_effect = discord.HTTPException(response=MagicMock(), message="Not found.") self.cog.webhook_id = 1 - log = logging.getLogger('bot.exts.duck_pond') + log = logging.getLogger(MODULE_PATH) with self.assertLogs(logger=log, level=logging.ERROR) as log_watcher: asyncio.run(self.cog.fetch_webhook()) @@ -282,7 +282,7 @@ class DuckPondTests(base.LoggingTestsMixin, unittest.IsolatedAsyncioTestCase): side_effects = (discord.errors.Forbidden(MagicMock(), ""), discord.errors.NotFound(MagicMock(), "")) self.cog.webhook = helpers.MockAsyncWebhook() - log = logging.getLogger("bot.exts.duck_pond") + log = logging.getLogger(MODULE_PATH) for side_effect in side_effects: # pragma: no cover send_attachments.side_effect = side_effect @@ -300,7 +300,7 @@ class DuckPondTests(base.LoggingTestsMixin, unittest.IsolatedAsyncioTestCase): message = helpers.MockMessage(clean_content="message", attachments=["attachment"]) self.cog.webhook = helpers.MockAsyncWebhook() - log = logging.getLogger("bot.exts.duck_pond") + log = logging.getLogger(MODULE_PATH) side_effect = discord.HTTPException(MagicMock(), "") send_attachments.side_effect = side_effect |