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 ): 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"])