summary refs log tree commit diff
path: root/tests/push
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2023-03-22 17:15:34 +0000
committerGitHub <noreply@github.com>2023-03-22 17:15:34 +0000
commit3b0083c92adf76daf4161908565de9e5efc08074 (patch)
treecc8e3883ec269a1153cd40b42eee5f737d906411 /tests/push
parentMerge branch 'release-v1.80' into develop (diff)
downloadsynapse-3b0083c92adf76daf4161908565de9e5efc08074.tar.xz
Use immutabledict instead of frozendict (#15113)
Additionally:

* Consistently use `freeze()` in test

---------

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'tests/push')
-rw-r--r--tests/push/test_push_rule_evaluator.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/push/test_push_rule_evaluator.py b/tests/push/test_push_rule_evaluator.py
index 52c4aafea6..b2536562e0 100644
--- a/tests/push/test_push_rule_evaluator.py
+++ b/tests/push/test_push_rule_evaluator.py
@@ -14,8 +14,6 @@
 
 from typing import Any, Dict, List, Optional, Union, cast
 
-import frozendict
-
 from twisted.test.proto_helpers import MemoryReactor
 
 import synapse.rest.admin
@@ -318,11 +316,11 @@ class PushRuleEvaluatorTestCase(unittest.TestCase):
             "pattern should only match at the start/end of the value",
         )
 
-        # it should work on frozendicts too
+        # it should work on frozen dictionaries too
         self._assert_matches(
             condition,
-            frozendict.frozendict({"value": "FoobaZ"}),
-            "patterns should match on frozendicts",
+            freeze({"value": "FoobaZ"}),
+            "patterns should match on frozen dictionaries",
         )
 
         # wildcards should match
@@ -425,11 +423,11 @@ class PushRuleEvaluatorTestCase(unittest.TestCase):
                 "incorrect types should not match",
             )
 
-        # it should work on frozendicts too
+        # it should work on frozen dictionaries too
         self._assert_matches(
             condition,
-            frozendict.frozendict({"value": "foobaz"}),
-            "values should match on frozendicts",
+            freeze({"value": "foobaz"}),
+            "values should match on frozen dictionaries",
         )
 
     def test_exact_event_match_boolean(self) -> None:
@@ -546,11 +544,11 @@ class PushRuleEvaluatorTestCase(unittest.TestCase):
             "does not search in a string",
         )
 
-        # it should work on frozendicts too
+        # it should work on frozen dictionaries too
         self._assert_matches(
             condition,
             freeze({"value": ["foobaz"]}),
-            "values should match on frozendicts",
+            "values should match on frozen dictionaries",
         )
 
     def test_no_body(self) -> None: