Skip to content

Commit b699a4e

Browse files
authored
Remove tests for async client as well
Removed tests for updating messages with restricted visibility.
1 parent acc6a1b commit b699a4e

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

stream_chat/tests/async_chat/test_client.py

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -390,64 +390,6 @@ async def test_update_message_partial(
390390
assert response["message"]["text"] == "helloworld"
391391
assert response["message"]["awesome"] is True
392392

393-
async def test_update_message_restricted_visibility(
394-
self,
395-
client: StreamChatAsync,
396-
channel: Channel,
397-
random_users: List[Dict],
398-
):
399-
amy = random_users[0]["id"]
400-
paul = random_users[1]["id"]
401-
user = random_users[2]["id"]
402-
403-
# Add users to channel
404-
await channel.add_members([amy, paul])
405-
406-
# Send initial message
407-
msg_id = str(uuid.uuid4())
408-
response = await channel.send_message(
409-
{"id": msg_id, "text": "hello world"}, user
410-
)
411-
assert response["message"]["text"] == "hello world"
412-
413-
# Update message with restricted visibility
414-
response = await client.update_message(
415-
{
416-
"id": msg_id,
417-
"text": "helloworld",
418-
"restricted_visibility": [amy, paul],
419-
"user": {"id": response["message"]["user"]["id"]},
420-
}
421-
)
422-
assert response["message"]["text"] == "helloworld"
423-
assert response["message"]["restricted_visibility"] == [amy, paul]
424-
425-
async def test_update_message_partial_restricted_visibility(
426-
self,
427-
client: StreamChatAsync,
428-
channel: Channel,
429-
random_users: List[Dict],
430-
):
431-
amy = random_users[0]["id"]
432-
paul = random_users[1]["id"]
433-
user = random_users[2]["id"]
434-
435-
# Add users to channel
436-
await channel.add_members([amy, paul])
437-
438-
msg_id = str(uuid.uuid4())
439-
response = await channel.send_message(
440-
{"id": msg_id, "text": "hello world"}, user
441-
)
442-
assert response["message"]["text"] == "hello world"
443-
response = await client.update_message_partial(
444-
msg_id,
445-
dict(set=dict(text="helloworld", restricted_visibility=[amy])),
446-
user,
447-
)
448-
449-
assert response["message"]["restricted_visibility"] == [amy]
450-
451393
async def test_delete_message(
452394
self, client: StreamChatAsync, channel: Channel, random_user: Dict
453395
):

0 commit comments

Comments
 (0)