@@ -509,15 +509,19 @@ def test_delete_message(self, client: StreamChat, channel, random_user: Dict):
509509 channel .send_message ({"id" : msg_id , "text" : "helloworld" }, random_user ["id" ])
510510 client .delete_message (msg_id , hard = True )
511511
512- def test_delete_message_with_deleted_by (
512+ def test_delete_message_for_me (
513513 self , client : StreamChat , channel , random_user : Dict
514514 ):
515- """Test deleting a message with deleted_by parameter """
515+ """Test deleting a message for a specific user (delete for me functionality) """
516516 msg_id = str (uuid .uuid4 ())
517517 channel .send_message ({"id" : msg_id , "text" : "helloworld" }, random_user ["id" ])
518518
519- # Delete message with deleted_by parameter
520- response = client .delete_message (msg_id , deleted_by = random_user ["id" ])
519+ # Delete message for the user
520+ response = client .delete_message (
521+ msg_id ,
522+ delete_for_me = True ,
523+ deleted_by = random_user ["id" ]
524+ )
521525
522526 # Verify the request succeeded
523527 assert response .is_ok ()
@@ -699,9 +703,10 @@ def test_query_channels_members_in(
699703 def test_create_blocklist (self , client : StreamChat ):
700704 client .create_blocklist (name = "Foo" , words = ["fudge" , "heck" ], type = "word" )
701705
702- def test_list_blocklists (self , client : StreamChat ):
706+ def test test_list_blocklists (self , client : StreamChat ):
703707 response = client .list_blocklists ()
704- assert len (response ["blocklists" ]) == 2
708+ # There are now 2 default blocklists + the "Foo" blocklist created by test_create_blocklist
709+ assert len (response ["blocklists" ]) >= 3
705710 blocklist_names = {blocklist ["name" ] for blocklist in response ["blocklists" ]}
706711 assert "Foo" in blocklist_names
707712
0 commit comments