diff --git a/tests/storage/test_roommember.py b/tests/storage/test_roommember.py
index 1218786d79..240b02cb9f 100644
--- a/tests/storage/test_roommember.py
+++ b/tests/storage/test_roommember.py
@@ -23,7 +23,6 @@ from synapse.util import Clock
from tests import unittest
from tests.server import TestHomeServer
-from tests.test_utils import event_injection
class RoomMemberStoreTestCase(unittest.HomeserverTestCase):
@@ -110,60 +109,6 @@ class RoomMemberStoreTestCase(unittest.HomeserverTestCase):
# It now knows about Charlie's server.
self.assertEqual(self.store._known_servers_count, 2)
- def test_get_joined_users_from_context(self) -> None:
- room = self.helper.create_room_as(self.u_alice, tok=self.t_alice)
- bob_event = self.get_success(
- event_injection.inject_member_event(
- self.hs, room, self.u_bob, Membership.JOIN
- )
- )
-
- # first, create a regular event
- event, context = self.get_success(
- event_injection.create_event(
- self.hs,
- room_id=room,
- sender=self.u_alice,
- prev_event_ids=[bob_event.event_id],
- type="m.test.1",
- content={},
- )
- )
-
- users = self.get_success(
- self.store.get_joined_users_from_context(event, context)
- )
- self.assertEqual(users.keys(), {self.u_alice, self.u_bob})
-
- # Regression test for #7376: create a state event whose key matches bob's
- # user_id, but which is *not* a membership event, and persist that; then check
- # that `get_joined_users_from_context` returns the correct users for the next event.
- non_member_event = self.get_success(
- event_injection.inject_event(
- self.hs,
- room_id=room,
- sender=self.u_bob,
- prev_event_ids=[bob_event.event_id],
- type="m.test.2",
- state_key=self.u_bob,
- content={},
- )
- )
- event, context = self.get_success(
- event_injection.create_event(
- self.hs,
- room_id=room,
- sender=self.u_alice,
- prev_event_ids=[non_member_event.event_id],
- type="m.test.3",
- content={},
- )
- )
- users = self.get_success(
- self.store.get_joined_users_from_context(event, context)
- )
- self.assertEqual(users.keys(), {self.u_alice, self.u_bob})
-
def test__null_byte_in_display_name_properly_handled(self) -> None:
room = self.helper.create_room_as(self.u_alice, tok=self.t_alice)
|