summary refs log tree commit diff
path: root/tests/events/test_utils.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-04-13 09:47:07 -0400
committerGitHub <noreply@github.com>2023-04-13 13:47:07 +0000
commit2503126d5245586b89c76e5f15f27c0a07774a45 (patch)
treeee7a73d442e06dc9aff2597e97e8cf809c8a5ed0 /tests/events/test_utils.py
parentOnly load the SSO redirect servlet if SSO is enabled. (#15421) (diff)
downloadsynapse-2503126d5245586b89c76e5f15f27c0a07774a45.tar.xz
Implement MSC2174: move redacts to a content property. (#15395)
This moves `redacts` from being a top-level property to
a `content` property in a new room version.

MSC2176 (which was previously implemented) states to not
`redact` this property.
Diffstat (limited to 'tests/events/test_utils.py')
-rw-r--r--tests/events/test_utils.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/events/test_utils.py b/tests/events/test_utils.py
index c35f58f462..1b179acb20 100644
--- a/tests/events/test_utils.py
+++ b/tests/events/test_utils.py
@@ -318,7 +318,11 @@ class PruneEventTestCase(stdlib_unittest.TestCase):
         """Redaction events have no special behaviour until MSC2174/MSC2176."""
 
         self.run_test(
-            {"type": "m.room.redaction", "content": {"redacts": "$test2:domain"}},
+            {
+                "type": "m.room.redaction",
+                "content": {"redacts": "$test2:domain"},
+                "redacts": "$test2:domain",
+            },
             {
                 "type": "m.room.redaction",
                 "content": {},
@@ -330,7 +334,11 @@ class PruneEventTestCase(stdlib_unittest.TestCase):
 
         # After MSC2174, redaction events keep the redacts content key.
         self.run_test(
-            {"type": "m.room.redaction", "content": {"redacts": "$test2:domain"}},
+            {
+                "type": "m.room.redaction",
+                "content": {"redacts": "$test2:domain"},
+                "redacts": "$test2:domain",
+            },
             {
                 "type": "m.room.redaction",
                 "content": {"redacts": "$test2:domain"},