-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code migration from gemini #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this pull request contains changes and commits that should not be here. I mean adding doc and gitattributes
in general when you create a PR. please review it first on your own before sending it to me. you should have noticed those extra files.
I think this happened because you created this branch from the docu branch not from main or maybe you need to rebase on main. I don't know what you did exactly so can you explain?
packages/happtiq_commons_google_cloud/src/happtiq_commons_google_cloud/gcs_api_service.py
Show resolved
Hide resolved
packages/happtiq_commons_google_cloud/src/happtiq_commons_google_cloud/gcs_api_service.py
Outdated
Show resolved
Hide resolved
packages/happtiq_commons_google_cloud/src/happtiq_commons_google_cloud/gcs_api_service.py
Outdated
Show resolved
Hide resolved
def test_list_files_with_prefix(gcs_api_service, monkeypatch): | ||
mock_client = MagicMock() | ||
mock_bucket = MagicMock() | ||
mock_blobs = [MagicMock(name="file1.txt"), MagicMock(name="file2.txt")] | ||
|
||
mock_client.bucket.return_value = mock_bucket | ||
mock_bucket.list_blobs.return_value = mock_blobs | ||
monkeypatch.setattr(gcs_api_service, "client", mock_client) | ||
|
||
bucket_name = "test-bucket" | ||
prefix = "test-prefix/" | ||
|
||
result = gcs_api_service.list_files_with_prefix(bucket_name, prefix) | ||
|
||
assert result == ["file1.txt", "file2.txt"] | ||
mock_client.bucket.assert_called_once_with(bucket_name) | ||
mock_bucket.list_blobs.assert_called_once_with(prefix=prefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks correct. please attach screenshot of the result of test run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix the test now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting I dont have this error
4dae4bf
to
41ed9ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this missing in the main code? and testing is also not added for def test_list_files_with_prefix... I think you already check them, after I delete the testing function in yaml we can merge this branch as well
f4ca890
to
00b11ef
Compare
No description provided.