feat(backup): wrapper de stockage S3 (boto3) + faux stockage de test (#89)

This commit is contained in:
Colin Maudry
2026-06-24 17:13:17 +02:00
parent efefc3f5b0
commit 108592f289
3 changed files with 99 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
class FakeStorage:
def __init__(self):
self.objects: dict[str, bytes] = {}
def upload_bytes(self, key, data):
self.objects[key] = data
def download_bytes(self, key):
return self.objects[key]
def list_keys(self, prefix):
return [k for k in self.objects if k.startswith(prefix)]
def delete(self, key):
self.objects.pop(key, None)