Skip to content

Commit

Permalink
try make tests work a bit more...
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed Dec 4, 2017
1 parent 95f8a71 commit 7b86c1f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/handlers/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def setUp(self):
"set_received_txn_response",
"get_destination_retry_timings",
"get_devices_by_remote",
# Bits that user_directory needs
"get_user_directory_stream_pos",
"get_current_state_deltas",
]),
state_handler=self.state_handler,
handlers=None,
Expand Down Expand Up @@ -122,6 +125,15 @@ def get_current_user_in_room(room_id):
return set(str(u) for u in self.room_members)
self.state_handler.get_current_user_in_room = get_current_user_in_room

self.datastore.get_user_directory_stream_pos.return_value = (
# we deliberately return a non-None stream pos to avoid doing an initial_spam
defer.succeed(1)
)

self.datastore.get_current_state_deltas.return_value = (
None
)

self.auth.check_joined_room = check_joined_room

self.datastore.get_to_device_stream_token = lambda: 0
Expand Down

0 comments on commit 7b86c1f

Please sign in to comment.