aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/filtering/test_filters.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bot/exts/filtering/test_filters.py b/tests/bot/exts/filtering/test_filters.py
index 214637b52..29b50188a 100644
--- a/tests/bot/exts/filtering/test_filters.py
+++ b/tests/bot/exts/filtering/test_filters.py
@@ -5,7 +5,7 @@ from bot.exts.filtering._filters.token import TokenFilter
from tests.helpers import MockMember, MockMessage, MockTextChannel
-class FilterTests(unittest.TestCase):
+class FilterTests(unittest.IsolatedAsyncioTestCase):
"""Test functionality of the token filter."""
def setUp(self) -> None:
@@ -14,7 +14,7 @@ class FilterTests(unittest.TestCase):
message = MockMessage(author=member, channel=channel)
self.ctx = FilterContext(Event.MESSAGE, member, channel, "", message)
- def test_token_filter_triggers(self):
+ async def test_token_filter_triggers(self):
"""The filter should evaluate to True only if its token is found in the context content."""
test_cases = (
(r"hi", "oh hi there", True),
@@ -37,5 +37,5 @@ class FilterTests(unittest.TestCase):
"additional_field": "{}" # noqa: P103
})
self.ctx.content = content
- result = filter_.triggered_on(self.ctx)
+ result = await filter_.triggered_on(self.ctx)
self.assertEqual(result, expected)