Use aioboto3 for asynchronous OCSP S3 uploads

This commit is contained in:
2026-10-27 22:23:33 +00:00
parent 0301cbff6f
commit 356e3beccd
4 changed files with 957 additions and 117 deletions
+14 -2
View File
@@ -1222,10 +1222,16 @@ class OcspSnapshotTests(unittest.TestCase):
from kca.models import OcspSnapshot
class FakeS3:
async def __aenter__(self):
return self
async def __aexit__(self, exc_type, exc, traceback):
return None
def __init__(self):
self.calls = []
def put_object(self, **kwargs):
async def put_object(self, **kwargs):
self.calls.append(kwargs)
fake = FakeS3()
@@ -1342,10 +1348,16 @@ class OcspSnapshotTests(unittest.TestCase):
from kca.models import Certificate, OcspSnapshot
class FakeS3:
async def __aenter__(self):
return self
async def __aexit__(self, exc_type, exc, traceback):
return None
def __init__(self):
self.objects = {}
def put_object(self, **kwargs):
async def put_object(self, **kwargs):
self.objects[kwargs["Key"]] = kwargs["Body"]
fake = FakeS3()