diff options
author | David Robertson <davidr@element.io> | 2023-03-22 17:15:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 17:15:34 +0000 |
commit | 3b0083c92adf76daf4161908565de9e5efc08074 (patch) | |
tree | cc8e3883ec269a1153cd40b42eee5f737d906411 /tests/api | |
parent | Merge branch 'release-v1.80' into develop (diff) | |
download | synapse-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/api')
-rw-r--r-- | tests/api/test_filtering.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/api/test_filtering.py b/tests/api/test_filtering.py index 0f45615160..6c6a9ab4b4 100644 --- a/tests/api/test_filtering.py +++ b/tests/api/test_filtering.py @@ -18,7 +18,6 @@ from typing import List from unittest.mock import patch import jsonschema -from frozendict import frozendict from twisted.test.proto_helpers import MemoryReactor @@ -29,6 +28,7 @@ from synapse.api.presence import UserPresenceState from synapse.server import HomeServer from synapse.types import JsonDict from synapse.util import Clock +from synapse.util.frozenutils import freeze from tests import unittest from tests.events.test_utils import MockEvent @@ -343,12 +343,12 @@ class FilteringTestCase(unittest.HomeserverTestCase): self.assertFalse(Filter(self.hs, definition)._check(event)) - # check it works with frozendicts too + # check it works with frozen dictionaries too event = MockEvent( sender="@foo:bar", type="m.room.message", room_id="!secretbase:unknown", - content=frozendict({EventContentFields.LABELS: ["#fun"]}), + content=freeze({EventContentFields.LABELS: ["#fun"]}), ) self.assertTrue(Filter(self.hs, definition)._check(event)) |