From 75c33d5fedab9925d30c98709921958b9ec7c5a3 Mon Sep 17 00:00:00 2001 From: c-bata Date: Wed, 31 Jan 2024 09:26:03 +0900 Subject: [PATCH] Update moto s3 library --- python_tests/artifact/test_boto3.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python_tests/artifact/test_boto3.py b/python_tests/artifact/test_boto3.py index 1dc448f0..9a48fb3e 100644 --- a/python_tests/artifact/test_boto3.py +++ b/python_tests/artifact/test_boto3.py @@ -2,12 +2,17 @@ import io from unittest import TestCase import boto3 -from moto import mock_s3 from optuna_dashboard.artifact.boto3 import Boto3Backend from optuna_dashboard.artifact.exceptions import ArtifactNotFound -@mock_s3 +try: + from moto import mock_aws +except ImportError: + from moto import mock_s3 as mock_aws + + +@mock_aws class Boto3BackendTestCase(TestCase): def setUp(self) -> None: self.s3_client = boto3.client("s3")