diff --git a/MANIFEST.in b/MANIFEST.in index 473d26d..d267794 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include LICENSE, target_s3_jsonl/logging.conf \ No newline at end of file +include requirements.txt LICENSE target_s3_jsonl/logging.conf \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index ed6428e..82815b7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifiers = packages = find: py_modules = target_s3_jsonl python_requires = >=3.8 +# install_requires = file: requirements.txt install_requires = jsonschema==4.7.2 boto3==1.24.28 diff --git a/target_s3_jsonl/s3.py b/target_s3_jsonl/s3.py index 672e6a0..cc92da0 100644 --- a/target_s3_jsonl/s3.py +++ b/target_s3_jsonl/s3.py @@ -1,7 +1,5 @@ #!/usr/bin/env python3 import os -import re -import time import backoff import boto3 from botocore.exceptions import ClientError diff --git a/tests/test_s3.py b/tests/test_s3.py index d58857b..5853903 100644 --- a/tests/test_s3.py +++ b/tests/test_s3.py @@ -27,6 +27,7 @@ def config_assume_role(): with open(Path('tests', 'resources', 'config_assume_role.json'), 'r', encoding='utf-8') as f: return json.load(f) + @fixture(scope='module') def aws_credentials(): """Mocked AWS Credentials for moto.""" @@ -48,10 +49,11 @@ def test_log_backoff_attempt(caplog): @mock_sts @mock_s3 def test_create_client_with_assumed_role(config_assume_role, caplog): - """Assert client is created with assumed role when role_arn is specified""" - client = create_client(config_assume_role) + """Assert client is created with assumed role when role_arn is specified""" + create_client(config_assume_role) assert caplog.text.endswith('Creating s3 client with role TestAssumeRole\n') + @mock_s3 def test_create_client(aws_credentials, config): '''TEST : simple upload_files call'''