Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Feb 12, 2024
1 parent cb2b7a2 commit 5c42a90
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/rest/client/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class RoomPermissionsTestCase(RoomBase):
rmcreator_id = "@notme:red"

def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
self.store_controllers = hs.get_storage_controllers()
self.helper.auth_user_id = self.rmcreator_id
# create some rooms under the name rmcreator_id
self.uncreated_rmid = "!aa:test"
Expand Down Expand Up @@ -482,6 +483,23 @@ def test_member_event_from_ban(self) -> None:
expect_code=HTTPStatus.OK,
)

def test_default_call_invite_power_level(self) -> None:
pl_event = self.get_success(
self.store_controllers.state.get_current_state_event(
self.created_public_rmid, EventTypes.PowerLevels, ""
)
)
assert pl_event is not None
self.assertEqual(50, pl_event.content.get("m.call.invite"))

private_pl_event = self.get_success(
self.store_controllers.state.get_current_state_event(
self.created_rmid, EventTypes.PowerLevels, ""
)
)
assert private_pl_event is not None
self.assertEqual(None, private_pl_event.content.get("m.call.invite"))


class RoomStateTestCase(RoomBase):
"""Tests /rooms/$room_id/state."""
Expand Down

0 comments on commit 5c42a90

Please sign in to comment.