@@ -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