diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-03-07 11:27:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 11:27:57 -0500 |
commit | 20ed8c926b518809e67e4d1696189413e851d2e4 (patch) | |
tree | 8bdff08e1a815cc71cc4892fffdc9c821c60ff17 /tests | |
parent | Pass the Requester down to the HttpTransactionCache. (#15200) (diff) | |
download | synapse-20ed8c926b518809e67e4d1696189413e851d2e4.tar.xz |
Stabilize support for MSC3873: disambuguated event push keys. (#15190)
This removes the experimental configuration option and always escapes the push rule condition keys. Also escapes any (experimental) push rule condition keys in the base rules which contain dot in a field name.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/push/test_push_rule_evaluator.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/push/test_push_rule_evaluator.py b/tests/push/test_push_rule_evaluator.py index 6deee0fd02..52c4aafea6 100644 --- a/tests/push/test_push_rule_evaluator.py +++ b/tests/push/test_push_rule_evaluator.py @@ -51,11 +51,7 @@ class FlattenDictTestCase(unittest.TestCase): # If a field has a dot in it, escape it. input = {"m.foo": {"b\\ar": "abc"}} - self.assertEqual({"m.foo.b\\ar": "abc"}, _flatten_dict(input)) - self.assertEqual( - {"m\\.foo.b\\\\ar": "abc"}, - _flatten_dict(input, msc3873_escape_event_match_key=True), - ) + self.assertEqual({"m\\.foo.b\\\\ar": "abc"}, _flatten_dict(input)) def test_non_string(self) -> None: """String, booleans, ints, nulls and list of those should be kept while other items are dropped.""" @@ -125,7 +121,7 @@ class FlattenDictTestCase(unittest.TestCase): "room_id": "!test:test", "sender": "@alice:test", "type": "m.room.message", - "content.org.matrix.msc1767.markup": [], + "content.org\\.matrix\\.msc1767\\.markup": [], } self.assertEqual(expected, _flatten_dict(event)) @@ -137,7 +133,7 @@ class FlattenDictTestCase(unittest.TestCase): "room_id": "!test:test", "sender": "@alice:test", "type": "m.room.message", - "content.org.matrix.msc1767.markup": [], + "content.org\\.matrix\\.msc1767\\.markup": [], } self.assertEqual(expected, _flatten_dict(event)) |