aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_transform_lambda.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_transform_lambda.py')
-rw-r--r--tests/test_transform_lambda.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test_transform_lambda.py b/tests/test_transform_lambda.py
index 06235f7..00f3d83 100644
--- a/tests/test_transform_lambda.py
+++ b/tests/test_transform_lambda.py
@@ -1,4 +1,4 @@
-from src.transform_lambda import read_from_s3_subfolder_to_df, list_existing_s3_files
+from src.transform_lambda import read_from_s3_subfolder_to_df, list_existing_s3_files, bucket_name
from moto import mock_aws
import pytest
import pandas as pd
@@ -120,4 +120,14 @@ class TestListExistingFiles:
result = list_existing_s3_files('mock_bucket', client=s3_client)
assert result == ["dummy.txt"]
- \ No newline at end of file
+class TestBucketName:
+ def test_functions_retrieves_bucket(self, s3_client):
+ s3_client.create_bucket(
+ Bucket='mock_bucket',
+ CreateBucketConfiguration={"LocationConstraint": "eu-west-2"}
+ )
+
+ bucket = bucket_name('mock_bucket', s3_client)
+ assert bucket == 'mock_bucket'
+
+ # def test_ \ No newline at end of file
git.ajschof.me — hosted by ajschofield — powered by cgit