mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 15:19:25 -05:00
Perform room unit tests with 'local' users actually in the right domain ;)
This commit is contained in:
parent
401c16559d
commit
fd696f1243
@ -76,6 +76,10 @@ class MessageHandler(BaseRoomHandler):
|
|||||||
Raises:
|
Raises:
|
||||||
SynapseError if something went wrong.
|
SynapseError if something went wrong.
|
||||||
"""
|
"""
|
||||||
|
# TODO(paul): Why does 'event' not have a 'user' object?
|
||||||
|
user = self.hs.parse_userid(event.user_id)
|
||||||
|
assert(user.is_mine)
|
||||||
|
|
||||||
if stamp_event:
|
if stamp_event:
|
||||||
event.content["hsob_ts"] = int(self.clock.time_msec())
|
event.content["hsob_ts"] = int(self.clock.time_msec())
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class RoomPermissionsTestCase(RestTestCase):
|
|||||||
persistence_service.get_latest_pdus_in_context.return_value = []
|
persistence_service.get_latest_pdus_in_context.return_value = []
|
||||||
|
|
||||||
hs = HomeServer(
|
hs = HomeServer(
|
||||||
"test",
|
"red",
|
||||||
db_pool=None,
|
db_pool=None,
|
||||||
http_client=None,
|
http_client=None,
|
||||||
datastore=MemoryDataStore(),
|
datastore=MemoryDataStore(),
|
||||||
@ -398,7 +398,7 @@ class RoomsMemberListTestCase(RestTestCase):
|
|||||||
persistence_service.get_latest_pdus_in_context.return_value = []
|
persistence_service.get_latest_pdus_in_context.return_value = []
|
||||||
|
|
||||||
hs = HomeServer(
|
hs = HomeServer(
|
||||||
"test",
|
"red",
|
||||||
db_pool=None,
|
db_pool=None,
|
||||||
http_client=None,
|
http_client=None,
|
||||||
datastore=MemoryDataStore(),
|
datastore=MemoryDataStore(),
|
||||||
@ -476,7 +476,7 @@ class RoomsCreateTestCase(RestTestCase):
|
|||||||
persistence_service.get_latest_pdus_in_context.return_value = []
|
persistence_service.get_latest_pdus_in_context.return_value = []
|
||||||
|
|
||||||
hs = HomeServer(
|
hs = HomeServer(
|
||||||
"test",
|
"red",
|
||||||
db_pool=None,
|
db_pool=None,
|
||||||
http_client=None,
|
http_client=None,
|
||||||
datastore=MemoryDataStore(),
|
datastore=MemoryDataStore(),
|
||||||
@ -566,7 +566,7 @@ class RoomTopicTestCase(RestTestCase):
|
|||||||
persistence_service.get_latest_pdus_in_context.return_value = []
|
persistence_service.get_latest_pdus_in_context.return_value = []
|
||||||
|
|
||||||
hs = HomeServer(
|
hs = HomeServer(
|
||||||
"test",
|
"red",
|
||||||
db_pool=None,
|
db_pool=None,
|
||||||
http_client=None,
|
http_client=None,
|
||||||
datastore=MemoryDataStore(),
|
datastore=MemoryDataStore(),
|
||||||
@ -669,7 +669,7 @@ class RoomMemberStateTestCase(RestTestCase):
|
|||||||
persistence_service.get_latest_pdus_in_context.return_value = []
|
persistence_service.get_latest_pdus_in_context.return_value = []
|
||||||
|
|
||||||
hs = HomeServer(
|
hs = HomeServer(
|
||||||
"test",
|
"red",
|
||||||
db_pool=None,
|
db_pool=None,
|
||||||
http_client=None,
|
http_client=None,
|
||||||
datastore=MemoryDataStore(),
|
datastore=MemoryDataStore(),
|
||||||
@ -794,7 +794,7 @@ class RoomMessagesTestCase(RestTestCase):
|
|||||||
persistence_service.get_latest_pdus_in_context.return_value = []
|
persistence_service.get_latest_pdus_in_context.return_value = []
|
||||||
|
|
||||||
hs = HomeServer(
|
hs = HomeServer(
|
||||||
"test",
|
"red",
|
||||||
db_pool=None,
|
db_pool=None,
|
||||||
http_client=None,
|
http_client=None,
|
||||||
datastore=MemoryDataStore(),
|
datastore=MemoryDataStore(),
|
||||||
|
Loading…
Reference in New Issue
Block a user