fix linter, fix ci, fix tests
This commit is contained in:
@@ -7,7 +7,6 @@ from pathlib import Path
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from helper_bot.utils.s3_storage import S3StorageService
|
||||
|
||||
|
||||
@@ -90,7 +89,9 @@ class TestS3StorageServiceUploadDownload:
|
||||
mock_context.__aenter__.return_value = mock_s3
|
||||
mock_context.__aexit__.return_value = None
|
||||
mock_session.client.return_value = mock_context
|
||||
with patch("helper_bot.utils.s3_storage.aioboto3.Session", return_value=mock_session):
|
||||
with patch(
|
||||
"helper_bot.utils.s3_storage.aioboto3.Session", return_value=mock_session
|
||||
):
|
||||
s = S3StorageService(
|
||||
endpoint_url="http://s3",
|
||||
access_key="ak",
|
||||
@@ -179,7 +180,9 @@ class TestS3StorageServiceDownloadToTemp:
|
||||
mock_context.__aenter__.return_value = mock_s3
|
||||
mock_context.__aexit__.return_value = None
|
||||
mock_session.client.return_value = mock_context
|
||||
with patch("helper_bot.utils.s3_storage.aioboto3.Session", return_value=mock_session):
|
||||
with patch(
|
||||
"helper_bot.utils.s3_storage.aioboto3.Session", return_value=mock_session
|
||||
):
|
||||
service = S3StorageService(
|
||||
endpoint_url="http://s3",
|
||||
access_key="ak",
|
||||
@@ -204,7 +207,9 @@ class TestS3StorageServiceDownloadToTemp:
|
||||
mock_context.__aenter__.return_value = mock_s3
|
||||
mock_context.__aexit__.return_value = None
|
||||
mock_session.client.return_value = mock_context
|
||||
with patch("helper_bot.utils.s3_storage.aioboto3.Session", return_value=mock_session):
|
||||
with patch(
|
||||
"helper_bot.utils.s3_storage.aioboto3.Session", return_value=mock_session
|
||||
):
|
||||
service = S3StorageService(
|
||||
endpoint_url="http://s3",
|
||||
access_key="ak",
|
||||
|
||||
Reference in New Issue
Block a user