Skip to content

Commit 72c2331

Browse files
committed
feat: add filter tags support for channels
1 parent 37d67b6 commit 72c2331

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import pytest
2+
from typing import Dict, List
3+
4+
from stream_chat.channel import Channel
5+
6+
7+
@pytest.mark.incremental
8+
class TestFilterTags:
9+
def test_add_and_remove_filter_tags(self, channel: Channel):
10+
# Add tags
11+
add_resp = channel.add_filter_tags(["vip", "premium"])
12+
assert "channel" in add_resp
13+
assert set(add_resp["channel"].get("filter_tags", [])) >= {"vip", "premium"}
14+
15+
# Remove one tag
16+
remove_resp = channel.remove_filter_tags(["premium"])
17+
assert "channel" in remove_resp
18+
remaining = remove_resp["channel"].get("filter_tags", [])
19+
assert "premium" not in remaining
20+
assert "vip" in remaining

0 commit comments

Comments
 (0)