diff options
author | Shay <hillerys@element.io> | 2022-09-28 03:11:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 10:11:48 +0000 |
commit | 8ab16a92edd675453c78cfd9974081e374b0f998 (patch) | |
tree | 57cb2dae52dbb6e3e09a18e1fb7e6038afcc4d20 /tests/handlers | |
parent | Prepatory work for batching events to send (#13487) (diff) | |
download | synapse-8ab16a92edd675453c78cfd9974081e374b0f998.tar.xz |
Persist CreateRoom events to DB in a batch (#13800)
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_message.py | 10 | ||||
-rw-r--r-- | tests/handlers/test_register.py | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/handlers/test_message.py b/tests/handlers/test_message.py index 986b50ce0c..99384837d0 100644 --- a/tests/handlers/test_message.py +++ b/tests/handlers/test_message.py @@ -105,7 +105,10 @@ class EventCreationTestCase(unittest.HomeserverTestCase): event1, context = self._create_duplicate_event(txn_id) ret_event1 = self.get_success( - self.handler.handle_new_client_event(self.requester, event1, context) + self.handler.handle_new_client_event( + self.requester, + events_and_context=[(event1, context)], + ) ) stream_id1 = ret_event1.internal_metadata.stream_ordering @@ -118,7 +121,10 @@ class EventCreationTestCase(unittest.HomeserverTestCase): self.assertNotEqual(event1.event_id, event2.event_id) ret_event2 = self.get_success( - self.handler.handle_new_client_event(self.requester, event2, context) + self.handler.handle_new_client_event( + self.requester, + events_and_context=[(event2, context)], + ) ) stream_id2 = ret_event2.internal_metadata.stream_ordering diff --git a/tests/handlers/test_register.py b/tests/handlers/test_register.py index 86b3d51975..765df75d91 100644 --- a/tests/handlers/test_register.py +++ b/tests/handlers/test_register.py @@ -497,7 +497,9 @@ class RegistrationTestCase(unittest.HomeserverTestCase): ) ) self.get_success( - event_creation_handler.handle_new_client_event(requester, event, context) + event_creation_handler.handle_new_client_event( + requester, events_and_context=[(event, context)] + ) ) # Register a second user, which won't be be in the room (or even have an invite) |