Skip to content

Commit 0b5a594

Browse files
fix: test
1 parent 8978ee2 commit 0b5a594

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

stream_chat/tests/test_channel.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)