From 8c9897dd4c64357232ebec8520d900fd4d31b2dd Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Tue, 6 Feb 2024 14:37:56 -0500 Subject: [PATCH] Tests: Require moto>=5.0.0 Moto 5.0.0 introduces changes which need to be handled in the s3 backup driver unit tests. Remove the code that handled older versions of moto. Change-Id: I29435c63ab57c5730f12d3fefde2149a52235636 --- cinder/tests/unit/backup/drivers/test_backup_s3.py | 5 +---- test-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cinder/tests/unit/backup/drivers/test_backup_s3.py b/cinder/tests/unit/backup/drivers/test_backup_s3.py index 2bdc93661f6..f89855ffa0f 100644 --- a/cinder/tests/unit/backup/drivers/test_backup_s3.py +++ b/cinder/tests/unit/backup/drivers/test_backup_s3.py @@ -26,10 +26,7 @@ from unittest import mock import zlib from eventlet import tpool -try: - from moto import mock_aws -except ImportError: - from moto import mock_s3 as mock_aws +from moto import mock_aws from oslo_utils import units from cinder.backup.drivers import s3 as s3_dr diff --git a/test-requirements.txt b/test-requirements.txt index 122e9e9377c..aad135c511c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -19,5 +19,5 @@ testtools>=2.4.0 # MIT doc8>=0.8.1 # Apache-2.0 mypy>=1.7.0 # MIT -moto>=2.2.5 # Apache-2.0 +moto>=5.0.0 # Apache-2.0 distro>=1.8.0 # Apache-2.0