Update tests

This commit is contained in:
Erik Johnston 2014-08-19 15:52:20 +01:00
parent 7c60905ee7
commit 41333452e5
2 changed files with 5 additions and 12 deletions

View File

@ -70,9 +70,9 @@ class FederationTestCase(unittest.TestCase):
store_id = "ASD"
self.datastore.persist_event.return_value = defer.succeed(store_id)
yield self.handlers.federation_handler.on_receive(event, False)
yield self.handlers.federation_handler.on_receive(event, False, False)
self.datastore.persist_event.assert_called_once_with(event)
self.datastore.persist_event.assert_called_once_with(event, False)
self.notifier.on_new_room_event.assert_called_once_with(
event, store_id)
@ -89,7 +89,7 @@ class FederationTestCase(unittest.TestCase):
content={},
)
yield self.handlers.federation_handler.on_receive(event, False)
yield self.handlers.federation_handler.on_receive(event, False, False)
mem_handler = self.handlers.room_member_handler
self.assertEquals(1, mem_handler.change_membership.call_count)
@ -115,7 +115,7 @@ class FederationTestCase(unittest.TestCase):
content={},
)
yield self.handlers.federation_handler.on_receive(event, False)
yield self.handlers.federation_handler.on_receive(event, False, False)
mem_handler = self.handlers.room_member_handler
self.assertEquals(0, mem_handler.change_membership.call_count)

View File

@ -287,14 +287,7 @@ class PresenceEventStreamTestCase(unittest.TestCase):
# all be ours
# I'll already get my own presence state change
self.assertEquals({"start": "0", "end": "1", "chunk": [
{"type": "m.presence",
"content": {
"user_id": "@apple:test",
"state": ONLINE,
"mtime_age": 0,
}},
]}, response)
self.assertEquals({"start": "1", "end": "1", "chunk": []}, response)
self.mock_datastore.set_presence_state.return_value = defer.succeed(
{"state": ONLINE})