Skip to content

Commit

Permalink
[Requirements] bump
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 7, 2025
1 parent e83fb53 commit fca8731
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
18 changes: 13 additions & 5 deletions additional_tests/supabase_backend_tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,22 @@ async def test_upload_asset(admin_client):
asset_name = "test_upload_asset"
asset_bucket = "product-images"
await admin_client.remove_asset(asset_bucket, asset_name) # remove asset if exists
uploaded_asset_id = await admin_client.upload_asset(asset_bucket, asset_name, asset_content)
uploaded_asset_path = await admin_client.upload_asset(asset_bucket, asset_name, asset_content)

assets = await admin_client.list_assets(asset_bucket)
asset_by_id = {
asset["id"]: asset
asset_by_name = {
asset["name"]: asset
for asset in assets
}
assert uploaded_asset_id in asset_by_id
assert asset_by_id[uploaded_asset_id]["name"] == asset_name
assert uploaded_asset_path in asset_by_name
assert asset_by_name[uploaded_asset_path]["name"] == asset_name

await admin_client.remove_asset(asset_bucket, asset_name)

assets = await admin_client.list_assets(asset_bucket)
asset_by_name = {
asset["name"]: asset
for asset in assets
}
# asset is removed
assert uploaded_asset_path not in asset_by_name
Original file line number Diff line number Diff line change
Expand Up @@ -862,19 +862,19 @@ async def upload_asset(self, bucket_name: str, asset_name: str, content: typing.
Not implemented for authenticated users
"""
result = await self.storage.from_(bucket_name).upload(asset_name, content)
return result.json()["Id"]
return result.path

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

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

async def send_signal(self, table, product_id: str, signal: str):
return (await self.table(table).insert({
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Drakkar-Software requirements
OctoBot-Commons==1.9.70
OctoBot-Trading==2.4.141
OctoBot-Trading==2.4.142
OctoBot-Evaluators==1.9.7
OctoBot-Tentacles-Manager==2.9.16
OctoBot-Services==1.6.21
Expand All @@ -18,14 +18,14 @@ setuptools==69.0.3

# Community
websockets
gmqtt==0.6.16
gmqtt==0.7.0
pgpy==0.6.0

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

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

Expand Down
2 changes: 0 additions & 2 deletions tests/unit_tests/community/test_community_mqtt_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ async def connected_community_feed(authenticator):
finally:
if feed is not None:
await feed.stop()
if feed._mqtt_client is not None and not feed._mqtt_client._resend_task.done():
feed._mqtt_client._resend_task.cancel()


async def test_start_and_connect(connected_community_feed):
Expand Down

0 comments on commit fca8731

Please sign in to comment.