21 lines
420 B
Python

import pytest
from src.aws.s3 import S3Resource
@pytest.fixture
def bucket_name():
return 'test-bucket'
@pytest.fixture
def s3_test(s3_client, bucket_name):
s3_client.create_bucket(Bucket=bucket_name)
yield
class TestS3Resource:
def test_put_object(self, s3_test, s3_client, bucket_name):
s3_resource = S3Resource(bucket_name)
s3_resource.put_object('hogehoge', 'aaaaaaaaaaaaaaa')