aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Steele Farnsworth <[email protected]>2025-02-12 14:42:47 -0500
committerGravatar GitHub <[email protected]>2025-02-12 14:42:47 -0500
commit16d3e5aa2ab6f27eea7a971b9660d388757fca72 (patch)
treeba00938f4cad9202ff09cd8ea372062a89db2437 /tests
parentIgnore both archived and locked posts when archiving idle (diff)
parentMerge branch 'main' into swfarnsworth/fix-auto-upload (diff)
Merge pull request #3247 from python-discord/swfarnsworth/fix-auto-upload
Swfarnsworth/fix auto upload
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/filtering/test_extension_filter.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/bot/exts/filtering/test_extension_filter.py b/tests/bot/exts/filtering/test_extension_filter.py
index f71de1e1b..67a503b30 100644
--- a/tests/bot/exts/filtering/test_extension_filter.py
+++ b/tests/bot/exts/filtering/test_extension_filter.py
@@ -69,40 +69,6 @@ class ExtensionsListTests(unittest.IsolatedAsyncioTestCase):
self.assertEqual(result, ({}, ["`.disallowed`"], {ListType.ALLOW: []}))
@patch("bot.instance", BOT)
- async def test_python_file_redirect_embed_description(self):
- """A message containing a .py file should result in an embed redirecting the user to our paste site."""
- attachment = MockAttachment(filename="python.py")
- ctx = self.ctx.replace(attachments=[attachment])
-
- await self.filter_list.actions_for(ctx)
-
- self.assertEqual(ctx.dm_embed, extension.PY_EMBED_DESCRIPTION)
-
- @patch("bot.instance", BOT)
- async def test_txt_file_redirect_embed_description(self):
- """A message containing a .txt/.json/.csv file should result in the correct embed."""
- test_values = (
- ("text", ".txt"),
- ("json", ".json"),
- ("csv", ".csv"),
- )
-
- for file_name, disallowed_extension in test_values:
- with self.subTest(file_name=file_name, disallowed_extension=disallowed_extension):
-
- attachment = MockAttachment(filename=f"{file_name}{disallowed_extension}")
- ctx = self.ctx.replace(attachments=[attachment])
-
- await self.filter_list.actions_for(ctx)
-
- self.assertEqual(
- ctx.dm_embed,
- extension.TXT_EMBED_DESCRIPTION.format(
- blocked_extension=disallowed_extension,
- )
- )
-
- @patch("bot.instance", BOT)
async def test_other_disallowed_extension_embed_description(self):
"""Test the description for a non .py/.txt/.json/.csv disallowed extension."""
attachment = MockAttachment(filename="python.disallowed")