From 3c91e3d2977c9febfce12541d1e9187bec1f454e Mon Sep 17 00:00:00 2001 From: Gang Li Date: Fri, 28 Jan 2022 12:05:56 +0800 Subject: [PATCH] Fix: tests failure due to new boto3 release --- requirements.txt | 6 +++--- tests/base.py | 2 ++ tests/requirements.txt | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3ec25922..3ba35c92 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ setuptools-rust jinja2 -boto3 -boto3_type_annotations -botocore +boto3==1.20.45 +botocore==1.23.45 +boto3_type_annotations==0.3.1 click requests ruamel.yaml diff --git a/tests/base.py b/tests/base.py index 88eeeba8..011a5b0f 100644 --- a/tests/base.py +++ b/tests/base.py @@ -26,6 +26,7 @@ from charon.storage import PRODUCT_META_KEY, CHECKSUM_META_KEY from tests.commons import TEST_BUCKET from boto3_type_annotations import s3 +from moto import mock_s3 SHORT_TEST_PREFIX = "ga" @@ -82,6 +83,7 @@ def get_config_base(self) -> str: return os.path.join(self.get_temp_dir(), '.charon') +@mock_s3 class PackageBaseTest(BaseTest): def setUp(self): super().setUp() diff --git a/tests/requirements.txt b/tests/requirements.txt index 55d4ddd3..de68f7b1 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,5 +5,5 @@ pytest-cov pytest-html flake8 requests-mock -moto +moto==3.0.2.dev12