From 0b5a59494715c2b9777e55ae55e76fcc0edfdc7e Mon Sep 17 00:00:00 2001 From: Lennart Kuijs Date: Fri, 6 Dec 2024 16:20:13 +0100 Subject: [PATCH] fix: test --- stream_chat/tests/test_channel.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stream_chat/tests/test_channel.py b/stream_chat/tests/test_channel.py index d575cd9..cf133b4 100644 --- a/stream_chat/tests/test_channel.py +++ b/stream_chat/tests/test_channel.py @@ -382,6 +382,8 @@ def test_pin_channel( self, client: StreamChat, channel: Channel, random_users: List[Dict] ): user_id = random_users[0]["id"] + channel.add_members([user_id]) + # Pin the channel response = channel.pin(user_id) assert response is not None @@ -390,8 +392,9 @@ def test_pin_channel( response = client.query_channels( {"pinned": True, "cid": channel.cid}, user_id=user_id ) + print(response) assert len(response["channels"]) == 1 - assert response["channels"][0]["cid"] == channel.cid + assert response["channels"][0]["channel"]["cid"] == channel.cid # Unpin the channel response = channel.unpin(user_id) @@ -402,4 +405,4 @@ def test_pin_channel( {"pinned": False, "cid": channel.cid}, user_id=user_id ) assert len(response["channels"]) == 1 - assert response["channels"][0]["cid"] == channel.cid + assert response["channels"][0]["channel"]["cid"] == channel.cid