Skip to content

Commit acc6a1b

Browse files
authored
[CHA-1630] Remove tests for updating restricted visibility
Removed tests for updating messages with restricted visibility.
1 parent b80c3d9 commit acc6a1b

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

stream_chat/tests/test_client.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -476,58 +476,6 @@ def test_update_message_partial(
476476
assert response["message"]["text"] == "helloworld"
477477
assert response["message"]["awesome"] is True
478478

479-
def test_update_message_restricted_visibility(
480-
self,
481-
client: StreamChat,
482-
channel: Channel,
483-
random_users: List[Dict],
484-
):
485-
amy = random_users[0]["id"]
486-
paul = random_users[1]["id"]
487-
user = random_users[2]["id"]
488-
# Add users to channel
489-
channel.add_members([amy, paul])
490-
491-
# Send initial message
492-
msg_id = str(uuid.uuid4())
493-
response = channel.send_message({"id": msg_id, "text": "hello world"}, user)
494-
assert response["message"]["text"] == "hello world"
495-
496-
# Update message with restricted visibility
497-
response = client.update_message(
498-
{
499-
"id": msg_id,
500-
"text": "helloworld",
501-
"restricted_visibility": [amy, paul],
502-
"user": {"id": response["message"]["user"]["id"]},
503-
}
504-
)
505-
assert response["message"]["text"] == "helloworld"
506-
assert response["message"]["restricted_visibility"] == [amy, paul]
507-
508-
def test_update_message_partial_restricted_visibility(
509-
self,
510-
client: StreamChat,
511-
channel: Channel,
512-
random_users: List[Dict],
513-
):
514-
amy = random_users[0]["id"]
515-
paul = random_users[1]["id"]
516-
user = random_users[2]["id"]
517-
# Add users to channel
518-
channel.add_members([amy, paul])
519-
520-
msg_id = str(uuid.uuid4())
521-
response = channel.send_message({"id": msg_id, "text": "hello world"}, user)
522-
assert response["message"]["text"] == "hello world"
523-
response = client.update_message_partial(
524-
msg_id,
525-
dict(set=dict(text="helloworld", restricted_visibility=[amy])),
526-
user,
527-
)
528-
529-
assert response["message"]["restricted_visibility"] == [amy]
530-
531479
def test_delete_message(self, client: StreamChat, channel, random_user: Dict):
532480
msg_id = str(uuid.uuid4())
533481
channel.send_message({"id": msg_id, "text": "helloworld"}, random_user["id"])

0 commit comments

Comments
 (0)