aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2023-03-23 19:51:06 +0200
committerGravatar mbaruh <[email protected]>2023-03-23 19:51:06 +0200
commitb64eee91c0e212e53307fbcdd72fe8794dd48d9d (patch)
tree81f9553f5a67a15b3f167d9cfac4b58858f8a079 /tests
parentMerge branch 'main' into new-filters (diff)
Fix filtering tests
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/filtering/test_settings_entries.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/bot/exts/filtering/test_settings_entries.py b/tests/bot/exts/filtering/test_settings_entries.py
index 5a1eb6fe6..c5f0152b0 100644
--- a/tests/bot/exts/filtering/test_settings_entries.py
+++ b/tests/bot/exts/filtering/test_settings_entries.py
@@ -152,7 +152,7 @@ class FilterTests(unittest.TestCase):
def test_infraction_merge_of_same_infraction_type(self):
"""When both infractions are of the same type, the one with the longer duration wins."""
infraction1 = InfractionAndNotification(
- infraction_type="MUTE",
+ infraction_type="TIMEOUT",
infraction_reason="hi",
infraction_duration=10,
dm_content="how",
@@ -160,7 +160,7 @@ class FilterTests(unittest.TestCase):
infraction_channel=0
)
infraction2 = InfractionAndNotification(
- infraction_type="MUTE",
+ infraction_type="TIMEOUT",
infraction_reason="there",
infraction_duration=20,
dm_content="are you",
@@ -168,12 +168,12 @@ class FilterTests(unittest.TestCase):
infraction_channel=0
)
- result = infraction1 | infraction2
+ result = infraction1.union(infraction2)
self.assertDictEqual(
result.dict(),
{
- "infraction_type": Infraction.MUTE,
+ "infraction_type": Infraction.TIMEOUT,
"infraction_reason": "there",
"infraction_duration": 20.0,
"dm_content": "are you",
@@ -185,7 +185,7 @@ class FilterTests(unittest.TestCase):
def test_infraction_merge_of_different_infraction_types(self):
"""If there are two different infraction types, the one higher up the hierarchy should be picked."""
infraction1 = InfractionAndNotification(
- infraction_type="MUTE",
+ infraction_type="TIMEOUT",
infraction_reason="hi",
infraction_duration=20,
dm_content="",
@@ -201,7 +201,7 @@ class FilterTests(unittest.TestCase):
infraction_channel=0
)
- result = infraction1 | infraction2
+ result = infraction1.union(infraction2)
self.assertDictEqual(
result.dict(),