Skip to content

Commit acc6cf0

Browse files
committed
[Requirements] bump
1 parent e83fb53 commit acc6cf0

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

Diff for: additional_tests/supabase_backend_tests/test_storage.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,22 @@ async def test_upload_asset(admin_client):
2828
asset_name = "test_upload_asset"
2929
asset_bucket = "product-images"
3030
await admin_client.remove_asset(asset_bucket, asset_name) # remove asset if exists
31-
uploaded_asset_id = await admin_client.upload_asset(asset_bucket, asset_name, asset_content)
31+
uploaded_asset_path = await admin_client.upload_asset(asset_bucket, asset_name, asset_content)
3232

3333
assets = await admin_client.list_assets(asset_bucket)
34-
asset_by_id = {
35-
asset["id"]: asset
34+
asset_by_name = {
35+
asset["name"]: asset
3636
for asset in assets
3737
}
38-
assert uploaded_asset_id in asset_by_id
39-
assert asset_by_id[uploaded_asset_id]["name"] == asset_name
38+
assert uploaded_asset_path in asset_by_name
39+
assert asset_by_name[uploaded_asset_path]["name"] == asset_name
4040

4141
await admin_client.remove_asset(asset_bucket, asset_name)
42+
43+
assets = await admin_client.list_assets(asset_bucket)
44+
asset_by_name = {
45+
asset["name"]: asset
46+
for asset in assets
47+
}
48+
# asset is removed
49+
assert uploaded_asset_path not in asset_by_name

Diff for: octobot/community/supabase_backend/community_supabase_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -862,19 +862,19 @@ async def upload_asset(self, bucket_name: str, asset_name: str, content: typing.
862862
Not implemented for authenticated users
863863
"""
864864
result = await self.storage.from_(bucket_name).upload(asset_name, content)
865-
return result.json()["Id"]
865+
return result.path
866866

867867
async def list_assets(self, bucket_name: str) -> list[dict[str, str]]:
868868
"""
869869
Not implemented for authenticated users
870870
"""
871871
return await self.storage.from_(bucket_name).list()
872872

873-
async def remove_asset(self, bucket_name: str, asset_name: str) -> None:
873+
async def remove_asset(self, bucket_name: str, asset_path: str) -> None:
874874
"""
875875
Not implemented for authenticated users
876876
"""
877-
await self.storage.from_(bucket_name).remove(asset_name)
877+
await self.storage.from_(bucket_name).remove([asset_path])
878878

879879
async def send_signal(self, table, product_id: str, signal: str):
880880
return (await self.table(table).insert({

Diff for: requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ setuptools==69.0.3
1818

1919
# Community
2020
websockets
21-
gmqtt==0.6.16
21+
gmqtt==0.7.0
2222
pgpy==0.6.0
2323

2424
# Error tracking
2525
sentry-sdk==2.13.0 # always make sure sentry_aiohttp_transport.py keep working
2626

2727
# Supabase ensure supabase_backend_tests keep passing when updating any of those
28-
supabase==2.7.1 # Supabase client
28+
supabase==2.11.0 # Supabase client
2929
gotrue # Supabase authenticated API (required by supabase and enforced to allow direct import)
3030
postgrest # Supabase posgres calls (required by supabase and enforced to allow direct import)
3131

Diff for: tests/unit_tests/community/test_community_mqtt_feed.py

-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ async def connected_community_feed(authenticator):
6969
finally:
7070
if feed is not None:
7171
await feed.stop()
72-
if feed._mqtt_client is not None and not feed._mqtt_client._resend_task.done():
73-
feed._mqtt_client._resend_task.cancel()
7472

7573

7674
async def test_start_and_connect(connected_community_feed):

0 commit comments

Comments
 (0)