amoghrajesh commented on code in PR #38398: URL: https://github.com/apache/airflow/pull/38398#discussion_r1538658019
########## tests/providers/google/cloud/hooks/test_gcs.py: ########## @@ -565,6 +565,20 @@ def test_object_get_md5hash(self, mock_service): assert response == returned_file_md5hash + @mock.patch(GCS_STRING.format("GCSHook.get_conn")) + def test_object_get_metadata(self, mock_service): + test_bucket = "test_bucket" + test_object = "test_object" + returned_file_metadata = {"test_metadata_key": "test_metadata_val"} + + bucket_method = mock_service.return_value.bucket + get_blob_method = bucket_method.return_value.get_blob + get_blob_method.return_value.metadata = returned_file_metadata + + response = self.gcs_hook.get_metadata(bucket_name=test_bucket, object_name=test_object) + + assert response == returned_file_metadata Review Comment: Can we add negative scenario test as well? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org