Skip to content

Commit e9f5339

Browse files
author
Rafael Marinho
committed
lint fix
1 parent 0d07788 commit e9f5339

File tree

4 files changed

+50
-26
lines changed

4 files changed

+50
-26
lines changed

stream_chat/tests/async_chat/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ async def cleanup_test_data():
162162
"""Global cleanup for test data"""
163163
yield
164164
# This runs after all tests complete
165-
# Add any global cleanup here if needed
165+
# Add any global cleanup here if needed

stream_chat/tests/async_chat/test_client.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,10 @@ async def test_query_channels_members_in(
723723

724724
async def test_create_blocklist(self, client: StreamChatAsync):
725725
blocklist_name = f"TestBlocklistAsync_{uuid.uuid4().hex[:8]}"
726-
await client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
727-
726+
await client.create_blocklist(
727+
name=blocklist_name, words=["fudge", "heck"], type="word"
728+
)
729+
728730
# Clean up after test
729731
try:
730732
await client.delete_blocklist(blocklist_name)
@@ -734,16 +736,20 @@ async def test_create_blocklist(self, client: StreamChatAsync):
734736
async def test_list_blocklists(self, client: StreamChatAsync):
735737
# First, clean up any existing test blocklists
736738
await cleanup_blocklists_async(client)
737-
739+
738740
# Create a test blocklist
739741
blocklist_name = f"TestBlocklistAsync_{uuid.uuid4().hex[:8]}"
740-
await client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
741-
742+
await client.create_blocklist(
743+
name=blocklist_name, words=["fudge", "heck"], type="word"
744+
)
745+
742746
try:
743747
response = await client.list_blocklists()
744748
# Should have at least 1 blocklist (the one we just created)
745749
assert len(response["blocklists"]) >= 1
746-
blocklist_names = {blocklist["name"] for blocklist in response["blocklists"]}
750+
blocklist_names = {
751+
blocklist["name"] for blocklist in response["blocklists"]
752+
}
747753
assert blocklist_name in blocklist_names
748754
finally:
749755
# Clean up
@@ -754,8 +760,10 @@ async def test_list_blocklists(self, client: StreamChatAsync):
754760

755761
async def test_get_blocklist(self, client: StreamChatAsync):
756762
blocklist_name = f"TestBlocklistAsync_{uuid.uuid4().hex[:8]}"
757-
await client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
758-
763+
await client.create_blocklist(
764+
name=blocklist_name, words=["fudge", "heck"], type="word"
765+
)
766+
759767
try:
760768
response = await client.get_blocklist(blocklist_name)
761769
assert response["blocklist"]["name"] == blocklist_name
@@ -769,8 +777,10 @@ async def test_get_blocklist(self, client: StreamChatAsync):
769777

770778
async def test_update_blocklist(self, client: StreamChatAsync):
771779
blocklist_name = f"TestBlocklistAsync_{uuid.uuid4().hex[:8]}"
772-
await client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
773-
780+
await client.create_blocklist(
781+
name=blocklist_name, words=["fudge", "heck"], type="word"
782+
)
783+
774784
try:
775785
await client.update_blocklist(blocklist_name, words=["dang"])
776786
response = await client.get_blocklist(blocklist_name)
@@ -784,9 +794,11 @@ async def test_update_blocklist(self, client: StreamChatAsync):
784794

785795
async def test_delete_blocklist(self, client: StreamChatAsync):
786796
blocklist_name = f"TestBlocklistAsync_{uuid.uuid4().hex[:8]}"
787-
await client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
797+
await client.create_blocklist(
798+
name=blocklist_name, words=["fudge", "heck"], type="word"
799+
)
788800
await client.delete_blocklist(blocklist_name)
789-
801+
790802
# Verify it's deleted
791803
try:
792804
await client.get_blocklist(blocklist_name)

stream_chat/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ def cleanup_test_data():
152152
"""Global cleanup for test data"""
153153
yield
154154
# This runs after all tests complete
155-
# Add any global cleanup here if needed
155+
# Add any global cleanup here if needed

stream_chat/tests/test_client.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,10 @@ def test_query_channels_members_in(
701701
def test_create_blocklist(self, client: StreamChat):
702702
# Use a unique name to avoid conflicts
703703
blocklist_name = f"TestBlocklist_{uuid.uuid4().hex[:8]}"
704-
client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
705-
704+
client.create_blocklist(
705+
name=blocklist_name, words=["fudge", "heck"], type="word"
706+
)
707+
706708
# Clean up after test
707709
try:
708710
client.delete_blocklist(blocklist_name)
@@ -712,16 +714,20 @@ def test_create_blocklist(self, client: StreamChat):
712714
def test_list_blocklists(self, client: StreamChat):
713715
# First, clean up any existing test blocklists
714716
cleanup_blocklists(client)
715-
717+
716718
# Create a test blocklist
717719
blocklist_name = f"TestBlocklist_{uuid.uuid4().hex[:8]}"
718-
client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
719-
720+
client.create_blocklist(
721+
name=blocklist_name, words=["fudge", "heck"], type="word"
722+
)
723+
720724
try:
721725
response = client.list_blocklists()
722726
# Should have at least 1 blocklist (the one we just created)
723727
assert len(response["blocklists"]) >= 1
724-
blocklist_names = {blocklist["name"] for blocklist in response["blocklists"]}
728+
blocklist_names = {
729+
blocklist["name"] for blocklist in response["blocklists"]
730+
}
725731
assert blocklist_name in blocklist_names
726732
finally:
727733
# Clean up
@@ -732,8 +738,10 @@ def test_list_blocklists(self, client: StreamChat):
732738

733739
def test_get_blocklist(self, client: StreamChat):
734740
blocklist_name = f"TestBlocklist_{uuid.uuid4().hex[:8]}"
735-
client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
736-
741+
client.create_blocklist(
742+
name=blocklist_name, words=["fudge", "heck"], type="word"
743+
)
744+
737745
try:
738746
response = client.get_blocklist(blocklist_name)
739747
assert response["blocklist"]["name"] == blocklist_name
@@ -747,8 +755,10 @@ def test_get_blocklist(self, client: StreamChat):
747755

748756
def test_update_blocklist(self, client: StreamChat):
749757
blocklist_name = f"TestBlocklist_{uuid.uuid4().hex[:8]}"
750-
client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
751-
758+
client.create_blocklist(
759+
name=blocklist_name, words=["fudge", "heck"], type="word"
760+
)
761+
752762
try:
753763
client.update_blocklist(blocklist_name, words=["dang"])
754764
response = client.get_blocklist(blocklist_name)
@@ -762,9 +772,11 @@ def test_update_blocklist(self, client: StreamChat):
762772

763773
def test_delete_blocklist(self, client: StreamChat):
764774
blocklist_name = f"TestBlocklist_{uuid.uuid4().hex[:8]}"
765-
client.create_blocklist(name=blocklist_name, words=["fudge", "heck"], type="word")
775+
client.create_blocklist(
776+
name=blocklist_name, words=["fudge", "heck"], type="word"
777+
)
766778
client.delete_blocklist(blocklist_name)
767-
779+
768780
# Verify it's deleted
769781
try:
770782
client.get_blocklist(blocklist_name)

0 commit comments

Comments
 (0)