summary refs log tree commit diff
path: root/tests/test_event_auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-01-25 18:31:41 +0000
committerErik Johnston <erik@matrix.org>2019-01-25 18:31:41 +0000
commitae2a957dbacc38f1126e2eca160f17322c710d26 (patch)
treeac1a5a65f1468214cc7e03a1e6a489f20ba65a74 /tests/test_event_auth.py
parentMerge pull request #4470 from matrix-org/erikj/require_format_version (diff)
downloadsynapse-ae2a957dbacc38f1126e2eca160f17322c710d26.tar.xz
Pass through room version to event auth
Diffstat (limited to 'tests/test_event_auth.py')
-rw-r--r--tests/test_event_auth.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/test_event_auth.py b/tests/test_event_auth.py
index 411b4a9f86..7ee318e4e8 100644
--- a/tests/test_event_auth.py
+++ b/tests/test_event_auth.py
@@ -16,6 +16,7 @@
 import unittest
 
 from synapse import event_auth
+from synapse.api.constants import RoomVersions
 from synapse.api.errors import AuthError
 from synapse.events import FrozenEvent
 
@@ -35,12 +36,16 @@ class EventAuthTestCase(unittest.TestCase):
         }
 
         # creator should be able to send state
-        event_auth.check(_random_state_event(creator), auth_events, do_sig_check=False)
+        event_auth.check(
+            RoomVersions.V1, _random_state_event(creator), auth_events,
+            do_sig_check=False,
+        )
 
         # joiner should not be able to send state
         self.assertRaises(
             AuthError,
             event_auth.check,
+            RoomVersions.V1,
             _random_state_event(joiner),
             auth_events,
             do_sig_check=False,
@@ -69,13 +74,17 @@ class EventAuthTestCase(unittest.TestCase):
         self.assertRaises(
             AuthError,
             event_auth.check,
+            RoomVersions.V1,
             _random_state_event(pleb),
             auth_events,
             do_sig_check=False,
         ),
 
         # king should be able to send state
-        event_auth.check(_random_state_event(king), auth_events, do_sig_check=False)
+        event_auth.check(
+            RoomVersions.V1, _random_state_event(king), auth_events,
+            do_sig_check=False,
+        )
 
 
 # helpers for making events