We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d779f1 commit 6a1f979Copy full SHA for 6a1f979
1 file changed
tests/test_gcp_client.py
@@ -1,6 +1,4 @@
1
-import pytest
2
from unittest.mock import patch, MagicMock
3
-from clients.gcp_client import list_gcs_objects
4
5
@patch("clients.gcp_client.storage.Client")
6
def test_list_gcs_objects(mock_client_class):
@@ -18,7 +16,10 @@ def test_list_gcs_objects(mock_client_class):
18
16
mock_client.get_bucket.return_value = mock_bucket
19
17
mock_client_class.return_value = mock_client
20
+ # ✅ Import AFTER patch is active
+ from clients.gcp_client import list_gcs_objects
21
objects = list_gcs_objects("demo-gcp")
22
+
23
assert isinstance(objects, list)
24
assert "demo-blob.json" in objects
25
assert "config.yaml" in objects
0 commit comments