0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-12 13:01:34 +01:00

Updates tests

This commit is contained in:
Erik Johnston 2018-01-15 16:52:12 +00:00
parent 3fa362502c
commit 25c0a020f4
2 changed files with 6 additions and 8 deletions

View file

@ -36,8 +36,7 @@ class RedactionTestCase(unittest.TestCase):
self.store = hs.get_datastore() self.store = hs.get_datastore()
self.event_builder_factory = hs.get_event_builder_factory() self.event_builder_factory = hs.get_event_builder_factory()
self.handlers = hs.get_handlers() self.event_creation_handler = hs.get_event_creation_handler()
self.message_handler = self.handlers.message_handler
self.u_alice = UserID.from_string("@alice:test") self.u_alice = UserID.from_string("@alice:test")
self.u_bob = UserID.from_string("@bob:test") self.u_bob = UserID.from_string("@bob:test")
@ -59,7 +58,7 @@ class RedactionTestCase(unittest.TestCase):
"content": content, "content": content,
}) })
event, context = yield self.message_handler._create_new_client_event( event, context = yield self.event_creation_handler._create_new_client_event(
builder builder
) )
@ -79,7 +78,7 @@ class RedactionTestCase(unittest.TestCase):
"content": {"body": body, "msgtype": u"message"}, "content": {"body": body, "msgtype": u"message"},
}) })
event, context = yield self.message_handler._create_new_client_event( event, context = yield self.event_creation_handler._create_new_client_event(
builder builder
) )
@ -98,7 +97,7 @@ class RedactionTestCase(unittest.TestCase):
"redacts": event_id, "redacts": event_id,
}) })
event, context = yield self.message_handler._create_new_client_event( event, context = yield self.event_creation_handler._create_new_client_event(
builder builder
) )

View file

@ -37,8 +37,7 @@ class RoomMemberStoreTestCase(unittest.TestCase):
# storage logic # storage logic
self.store = hs.get_datastore() self.store = hs.get_datastore()
self.event_builder_factory = hs.get_event_builder_factory() self.event_builder_factory = hs.get_event_builder_factory()
self.handlers = hs.get_handlers() self.event_creation_handler = hs.get_event_creation_handler()
self.message_handler = self.handlers.message_handler
self.u_alice = UserID.from_string("@alice:test") self.u_alice = UserID.from_string("@alice:test")
self.u_bob = UserID.from_string("@bob:test") self.u_bob = UserID.from_string("@bob:test")
@ -58,7 +57,7 @@ class RoomMemberStoreTestCase(unittest.TestCase):
"content": {"membership": membership}, "content": {"membership": membership},
}) })
event, context = yield self.message_handler._create_new_client_event( event, context = yield self.event_creation_handler._create_new_client_event(
builder builder
) )