mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-10 12:23:22 +08:00
Merge pull request #785 from c-bata/fix-moto
Add support for `moto==5.0.0`
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user