aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steele Farnsworth <[email protected]>2025-01-30 22:49:09 -0500
committerGravatar Steele Farnsworth <[email protected]>2025-01-30 22:49:09 -0500
commita89d3ae9c3cfda8010faa64291a0c97abeb8324a (patch)
tree669fb95c9aeedf5eaad5924e5b5e38baf5a81235
parentMark tests that aren't passing with xfail. (diff)
Remove tests for deleted behavior.
Previously, (txt, csv, json, and py) files evoked special behavior from the filtering system. This is no longer the case.
-rw-r--r--tests/bot/exts/filtering/test_extension_filter.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/bot/exts/filtering/test_extension_filter.py b/tests/bot/exts/filtering/test_extension_filter.py
index d04a81e62..67a503b30 100644
--- a/tests/bot/exts/filtering/test_extension_filter.py
+++ b/tests/bot/exts/filtering/test_extension_filter.py
@@ -2,7 +2,6 @@ import unittest
from unittest.mock import MagicMock, patch
import arrow
-import pytest
from bot.constants import Channels
from bot.exts.filtering._filter_context import Event, FilterContext
@@ -69,42 +68,6 @@ class ExtensionsListTests(unittest.IsolatedAsyncioTestCase):
self.assertEqual(result, ({}, ["`.disallowed`"], {ListType.ALLOW: []}))
- @pytest.mark.xfail
- @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)
-
- @pytest.mark.xfail
- @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."""