aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_transform_lambda.py
diff options
context:
space:
mode:
authorlian-manonog <lian.manonog@gmail.com>2024-08-23 16:35:55 +0100
committerlian-manonog <lian.manonog@gmail.com>2024-08-23 16:35:55 +0100
commitf1e10e1a2f573c152b19a630577a71ce9aff2bb4 (patch)
treeef5acf411bc7f834634ff8692305caf6b562faf0 /tests/test_transform_lambda.py
parenta69fe58b47bcc5ad02986bcf404f060774aec9a7 (diff)
downloadde-project-bentley-f1e10e1a2f573c152b19a630577a71ce9aff2bb4.tar.gz
de-project-bentley-f1e10e1a2f573c152b19a630577a71ce9aff2bb4.zip
wip: writing more tests for the helper functions
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