Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
berroar committed Feb 9, 2024
1 parent 1584c53 commit 8b3fe07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_google_cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

from scripts.google_cloud_storage import GoogleCloudStorage


@pytest.fixture
def patch_gcs_client(mocker):
return mocker.patch("scripts.google_cloud_storage.storage.Client")


def test_upload_files(patch_gcs_client):
gcs_storage = GoogleCloudStorage(bucket_name="benchmark_bucket")
gcs_storage = GoogleCloudStorage(bucket_name="benchmark_bucket")

gcs_storage.upload_files(output_files=["mock_output_stats.csv"], directory="benchmark_outputs")

Expand All @@ -17,8 +19,9 @@ def test_upload_files(patch_gcs_client):
assert blob.upload_from_filename.call_count == 1
assert blob.upload_from_filename.call_args[1] == {"filename": "mock_output_stats.csv"}


def test_upload_files_with_prefix(patch_gcs_client):
gcs_storage = GoogleCloudStorage(bucket_name="benchmark_bucket")
gcs_storage = GoogleCloudStorage(bucket_name="benchmark_bucket")

gcs_storage.upload_files(output_files=["mock_output_stats.csv"], directory="benchmark_outputs", output_filename_prefix="test")

Expand Down

0 comments on commit 8b3fe07

Please sign in to comment.