Пример #1
0
 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"])
     client.delete_message(msg_id)
     msg_id = str(uuid.uuid4())
     channel.send_message({"id": msg_id, "text": "helloworld"}, random_user["id"])
     client.delete_message(msg_id, hard=True)
Пример #2
0
 def test_get_message(self, client: StreamChat, channel, random_user: Dict):
     msg_id = str(uuid.uuid4())
     channel.send_message({"id": msg_id, "text": "helloworld"}, random_user["id"])
     client.delete_message(msg_id)
     msg_id = str(uuid.uuid4())
     channel.send_message({"id": msg_id, "text": "helloworld"}, random_user["id"])
     message = client.get_message(msg_id)
     assert message["message"]["id"] == msg_id