summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-05-15 09:30:10 -0400
committerGitHub <noreply@github.com>2020-05-15 09:30:10 -0400
commit08bc80ef096497ca8197657c98a3a710623b3135 (patch)
tree365eb0af70a6d53fd4c89e486157554299faa1f7 /tests
parentIgnore incoming presence updates when presence is disabled (#7508) (diff)
downloadsynapse-08bc80ef096497ca8197657c98a3a710623b3135.tar.xz
Implement room version 6 (MSC2240). (#7506)
Diffstat (limited to 'tests')
-rw-r--r--tests/events/test_utils.py2
-rw-r--r--tests/handlers/test_federation.py6
-rw-r--r--tests/test_event_auth.py16
3 files changed, 9 insertions, 15 deletions
diff --git a/tests/events/test_utils.py b/tests/events/test_utils.py
index ab5f5ac549..c1274c14af 100644
--- a/tests/events/test_utils.py
+++ b/tests/events/test_utils.py
@@ -156,7 +156,7 @@ class PruneEventTestCase(unittest.TestCase):
                 "signatures": {},
                 "unsigned": {},
             },
-            room_version=RoomVersions.MSC2432_DEV,
+            room_version=RoomVersions.V6,
         )
 
 
diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py
index dfef58e704..96fea58673 100644
--- a/tests/handlers/test_federation.py
+++ b/tests/handlers/test_federation.py
@@ -226,7 +226,7 @@ class EventFromPduTestCase(TestCase):
                 "auth_events": [],
                 "origin_server_ts": 1234,
             },
-            RoomVersions.STRICT_CANONICALJSON,
+            RoomVersions.V6,
         )
 
         self.assertIsInstance(ev, EventBase)
@@ -253,7 +253,7 @@ class EventFromPduTestCase(TestCase):
                         "auth_events": [],
                         "origin_server_ts": 1234,
                     },
-                    RoomVersions.STRICT_CANONICALJSON,
+                    RoomVersions.V6,
                 )
 
     def test_invalid_nested(self):
@@ -270,5 +270,5 @@ class EventFromPduTestCase(TestCase):
                     "auth_events": [],
                     "origin_server_ts": 1234,
                 },
-                RoomVersions.STRICT_CANONICALJSON,
+                RoomVersions.V6,
             )
diff --git a/tests/test_event_auth.py b/tests/test_event_auth.py
index f2def601fb..69b4c5d6c2 100644
--- a/tests/test_event_auth.py
+++ b/tests/test_event_auth.py
@@ -136,21 +136,18 @@ class EventAuthTestCase(unittest.TestCase):
 
         # creator should be able to send aliases
         event_auth.check(
-            RoomVersions.MSC2432_DEV,
-            _alias_event(creator),
-            auth_events,
-            do_sig_check=False,
+            RoomVersions.V6, _alias_event(creator), auth_events, do_sig_check=False,
         )
 
         # No particular checks are done on the state key.
         event_auth.check(
-            RoomVersions.MSC2432_DEV,
+            RoomVersions.V6,
             _alias_event(creator, state_key=""),
             auth_events,
             do_sig_check=False,
         )
         event_auth.check(
-            RoomVersions.MSC2432_DEV,
+            RoomVersions.V6,
             _alias_event(creator, state_key="test.com"),
             auth_events,
             do_sig_check=False,
@@ -159,10 +156,7 @@ class EventAuthTestCase(unittest.TestCase):
         # Per standard auth rules, the member must be in the room.
         with self.assertRaises(AuthError):
             event_auth.check(
-                RoomVersions.MSC2432_DEV,
-                _alias_event(other),
-                auth_events,
-                do_sig_check=False,
+                RoomVersions.V6, _alias_event(other), auth_events, do_sig_check=False,
             )
 
     def test_msc2209(self):
@@ -192,7 +186,7 @@ class EventAuthTestCase(unittest.TestCase):
         # But an MSC2209 room rejects this change.
         with self.assertRaises(AuthError):
             event_auth.check(
-                RoomVersions.MSC2209_DEV,
+                RoomVersions.V6,
                 _power_levels_event(pleb, {"notifications": {"room": 100}}),
                 auth_events,
                 do_sig_check=False,