File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,8 @@ def test_pin_channel(
382382 self , client : StreamChat , channel : Channel , random_users : List [Dict ]
383383 ):
384384 user_id = random_users [0 ]["id" ]
385+ channel .add_members ([user_id ])
386+
385387 # Pin the channel
386388 response = channel .pin (user_id )
387389 assert response is not None
@@ -390,8 +392,9 @@ def test_pin_channel(
390392 response = client .query_channels (
391393 {"pinned" : True , "cid" : channel .cid }, user_id = user_id
392394 )
395+ print (response )
393396 assert len (response ["channels" ]) == 1
394- assert response ["channels" ][0 ]["cid" ] == channel .cid
397+ assert response ["channels" ][0 ]["channel" ][ " cid" ] == channel .cid
395398
396399 # Unpin the channel
397400 response = channel .unpin (user_id )
@@ -402,4 +405,4 @@ def test_pin_channel(
402405 {"pinned" : False , "cid" : channel .cid }, user_id = user_id
403406 )
404407 assert len (response ["channels" ]) == 1
405- assert response ["channels" ][0 ]["cid" ] == channel .cid
408+ assert response ["channels" ][0 ]["channel" ][ " cid" ] == channel .cid
You can’t perform that action at this time.
0 commit comments