mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Collect room-version variations into one place (#4969)
Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
This commit is contained in:
parent
215c15d049
commit
54a87a7b08
28 changed files with 222 additions and 168 deletions
|
@ -16,8 +16,8 @@
|
|||
import unittest
|
||||
|
||||
from synapse import event_auth
|
||||
from synapse.api.constants import RoomVersions
|
||||
from synapse.api.errors import AuthError
|
||||
from synapse.api.room_versions import RoomVersions
|
||||
from synapse.events import FrozenEvent
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ class EventAuthTestCase(unittest.TestCase):
|
|||
|
||||
# creator should be able to send state
|
||||
event_auth.check(
|
||||
RoomVersions.V1, _random_state_event(creator), auth_events,
|
||||
RoomVersions.V1.identifier, _random_state_event(creator), auth_events,
|
||||
do_sig_check=False,
|
||||
)
|
||||
|
||||
|
@ -45,7 +45,7 @@ class EventAuthTestCase(unittest.TestCase):
|
|||
self.assertRaises(
|
||||
AuthError,
|
||||
event_auth.check,
|
||||
RoomVersions.V1,
|
||||
RoomVersions.V1.identifier,
|
||||
_random_state_event(joiner),
|
||||
auth_events,
|
||||
do_sig_check=False,
|
||||
|
@ -74,7 +74,7 @@ class EventAuthTestCase(unittest.TestCase):
|
|||
self.assertRaises(
|
||||
AuthError,
|
||||
event_auth.check,
|
||||
RoomVersions.V1,
|
||||
RoomVersions.V1.identifier,
|
||||
_random_state_event(pleb),
|
||||
auth_events,
|
||||
do_sig_check=False,
|
||||
|
@ -82,7 +82,7 @@ class EventAuthTestCase(unittest.TestCase):
|
|||
|
||||
# king should be able to send state
|
||||
event_auth.check(
|
||||
RoomVersions.V1, _random_state_event(king), auth_events,
|
||||
RoomVersions.V1.identifier, _random_state_event(king), auth_events,
|
||||
do_sig_check=False,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue