# HG changeset patch
# User Fabien Amarger <fabien.amarger@logilab.fr>
# Date 1708945875 -3600
#      Mon Feb 26 12:11:15 2024 +0100
# Node ID 06bd6a68c09dcdedd92a583f840683d05cf7efb8
# Parent  d634ad066206e537a9b305681718c40b0c41facc
fix: Use mock_aws instead of mock_s3

The moto@v5 do not implement mock_s3 anymore, it uses mock_aws instead.
This version is used since we do have a python3.9 project (under it uses a
moto@v4 in which mock_s3 is still present).

diff --git a/cubicweb_s3storage/testing.py b/cubicweb_s3storage/testing.py
--- a/cubicweb_s3storage/testing.py
+++ b/cubicweb_s3storage/testing.py
@@ -1,13 +1,13 @@
 import boto3
 from unittest.mock import patch
-from moto import mock_s3
+from moto import mock_aws
 
 
 class S3StorageTestMixin:
     s3_bucket = "test-bucket"
 
     def setUp(self):
-        s3_mock = mock_s3()
+        s3_mock = mock_aws()
         s3_mock.start()
         resource = boto3.resource("s3", region_name="us-east-1")
         self.s3_bucket = resource.create_bucket(Bucket=self.s3_bucket)