Perform room unit tests with 'local' users actually in the right domain ;)

paul/schema_breaking_changes
Paul "LeoNerd" Evans 2014-09-01 15:58:16 +01:00
parent 401c16559d
commit fd696f1243
2 changed files with 10 additions and 6 deletions

View File

@ -76,6 +76,10 @@ class MessageHandler(BaseRoomHandler):
Raises:
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:
event.content["hsob_ts"] = int(self.clock.time_msec())

View File

@ -51,7 +51,7 @@ class RoomPermissionsTestCase(RestTestCase):
persistence_service.get_latest_pdus_in_context.return_value = []
hs = HomeServer(
"test",
"red",
db_pool=None,
http_client=None,
datastore=MemoryDataStore(),
@ -398,7 +398,7 @@ class RoomsMemberListTestCase(RestTestCase):
persistence_service.get_latest_pdus_in_context.return_value = []
hs = HomeServer(
"test",
"red",
db_pool=None,
http_client=None,
datastore=MemoryDataStore(),
@ -476,7 +476,7 @@ class RoomsCreateTestCase(RestTestCase):
persistence_service.get_latest_pdus_in_context.return_value = []
hs = HomeServer(
"test",
"red",
db_pool=None,
http_client=None,
datastore=MemoryDataStore(),
@ -566,7 +566,7 @@ class RoomTopicTestCase(RestTestCase):
persistence_service.get_latest_pdus_in_context.return_value = []
hs = HomeServer(
"test",
"red",
db_pool=None,
http_client=None,
datastore=MemoryDataStore(),
@ -669,7 +669,7 @@ class RoomMemberStateTestCase(RestTestCase):
persistence_service.get_latest_pdus_in_context.return_value = []
hs = HomeServer(
"test",
"red",
db_pool=None,
http_client=None,
datastore=MemoryDataStore(),
@ -794,7 +794,7 @@ class RoomMessagesTestCase(RestTestCase):
persistence_service.get_latest_pdus_in_context.return_value = []
hs = HomeServer(
"test",
"red",
db_pool=None,
http_client=None,
datastore=MemoryDataStore(),