Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jul 14, 2022
1 parent a9530ad commit d6548be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/rest/client/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def test_post_room_no_keys(self) -> None:
self.assertEqual(200, channel.code, channel.result)
self.assertTrue("room_id" in channel.json_body)
assert channel.resource_usage is not None
self.assertEqual(32, channel.resource_usage.db_txn_count)
self.assertEqual(36, channel.resource_usage.db_txn_count)

def test_post_room_initial_state(self) -> None:
# POST with initial_state config key, expect new room id
Expand All @@ -722,7 +722,7 @@ def test_post_room_initial_state(self) -> None:
self.assertEqual(200, channel.code, channel.result)
self.assertTrue("room_id" in channel.json_body)
assert channel.resource_usage is not None
self.assertEqual(35, channel.resource_usage.db_txn_count)
self.assertEqual(40, channel.resource_usage.db_txn_count)

def test_post_room_visibility_key(self) -> None:
# POST with visibility config key, expect new room id
Expand Down
4 changes: 4 additions & 0 deletions tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ async def store_state_group(
state_group = self._next_group
self._next_group += 1

if current_state_ids is None:
current_state_ids = dict(self._group_to_state[prev_group])
current_state_ids.update(delta_ids)

self._group_to_state[state_group] = dict(current_state_ids)

return state_group
Expand Down

0 comments on commit d6548be

Please sign in to comment.