From acc6a1b3d5dacc86c8f7a67d407a262393c3e730 Mon Sep 17 00:00:00 2001 From: Marius Kleidl <1375043+Acconut@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:16:04 +0100 Subject: [PATCH 1/2] [CHA-1630] Remove tests for updating restricted visibility Removed tests for updating messages with restricted visibility. --- stream_chat/tests/test_client.py | 52 -------------------------------- 1 file changed, 52 deletions(-) diff --git a/stream_chat/tests/test_client.py b/stream_chat/tests/test_client.py index 981baa9..1b09412 100644 --- a/stream_chat/tests/test_client.py +++ b/stream_chat/tests/test_client.py @@ -476,58 +476,6 @@ def test_update_message_partial( assert response["message"]["text"] == "helloworld" assert response["message"]["awesome"] is True - def test_update_message_restricted_visibility( - self, - client: StreamChat, - channel: Channel, - random_users: List[Dict], - ): - amy = random_users[0]["id"] - paul = random_users[1]["id"] - user = random_users[2]["id"] - # Add users to channel - channel.add_members([amy, paul]) - - # Send initial message - msg_id = str(uuid.uuid4()) - response = channel.send_message({"id": msg_id, "text": "hello world"}, user) - assert response["message"]["text"] == "hello world" - - # Update message with restricted visibility - response = client.update_message( - { - "id": msg_id, - "text": "helloworld", - "restricted_visibility": [amy, paul], - "user": {"id": response["message"]["user"]["id"]}, - } - ) - assert response["message"]["text"] == "helloworld" - assert response["message"]["restricted_visibility"] == [amy, paul] - - def test_update_message_partial_restricted_visibility( - self, - client: StreamChat, - channel: Channel, - random_users: List[Dict], - ): - amy = random_users[0]["id"] - paul = random_users[1]["id"] - user = random_users[2]["id"] - # Add users to channel - channel.add_members([amy, paul]) - - msg_id = str(uuid.uuid4()) - response = channel.send_message({"id": msg_id, "text": "hello world"}, user) - assert response["message"]["text"] == "hello world" - response = client.update_message_partial( - msg_id, - dict(set=dict(text="helloworld", restricted_visibility=[amy])), - user, - ) - - assert response["message"]["restricted_visibility"] == [amy] - def test_delete_message(self, client: StreamChat, channel, random_user: Dict): msg_id = str(uuid.uuid4()) channel.send_message({"id": msg_id, "text": "helloworld"}, random_user["id"]) From b699a4e7f30bfbdf90a149ecff3284afbbf3ed46 Mon Sep 17 00:00:00 2001 From: Marius Kleidl <1375043+Acconut@users.noreply.github.com> Date: Thu, 18 Dec 2025 17:19:30 +0100 Subject: [PATCH 2/2] Remove tests for async client as well Removed tests for updating messages with restricted visibility. --- stream_chat/tests/async_chat/test_client.py | 58 --------------------- 1 file changed, 58 deletions(-) diff --git a/stream_chat/tests/async_chat/test_client.py b/stream_chat/tests/async_chat/test_client.py index 9efec32..76503e5 100644 --- a/stream_chat/tests/async_chat/test_client.py +++ b/stream_chat/tests/async_chat/test_client.py @@ -390,64 +390,6 @@ async def test_update_message_partial( assert response["message"]["text"] == "helloworld" assert response["message"]["awesome"] is True - async def test_update_message_restricted_visibility( - self, - client: StreamChatAsync, - channel: Channel, - random_users: List[Dict], - ): - amy = random_users[0]["id"] - paul = random_users[1]["id"] - user = random_users[2]["id"] - - # Add users to channel - await channel.add_members([amy, paul]) - - # Send initial message - msg_id = str(uuid.uuid4()) - response = await channel.send_message( - {"id": msg_id, "text": "hello world"}, user - ) - assert response["message"]["text"] == "hello world" - - # Update message with restricted visibility - response = await client.update_message( - { - "id": msg_id, - "text": "helloworld", - "restricted_visibility": [amy, paul], - "user": {"id": response["message"]["user"]["id"]}, - } - ) - assert response["message"]["text"] == "helloworld" - assert response["message"]["restricted_visibility"] == [amy, paul] - - async def test_update_message_partial_restricted_visibility( - self, - client: StreamChatAsync, - channel: Channel, - random_users: List[Dict], - ): - amy = random_users[0]["id"] - paul = random_users[1]["id"] - user = random_users[2]["id"] - - # Add users to channel - await channel.add_members([amy, paul]) - - msg_id = str(uuid.uuid4()) - response = await channel.send_message( - {"id": msg_id, "text": "hello world"}, user - ) - assert response["message"]["text"] == "hello world" - response = await client.update_message_partial( - msg_id, - dict(set=dict(text="helloworld", restricted_visibility=[amy])), - user, - ) - - assert response["message"]["restricted_visibility"] == [amy] - async def test_delete_message( self, client: StreamChatAsync, channel: Channel, random_user: Dict ):