We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a455909 commit 8ff2312Copy full SHA for 8ff2312
1 file changed
gcsfs/tests/conftest.py
@@ -147,6 +147,20 @@ def docker_gcs():
147
stop_docker(container)
148
149
150
+@pytest.fixture(autouse=True)
151
+def mock_control_plane_channel():
152
+ from unittest import mock
153
+
154
+ # Mock create_channel to prevent real gRPC channel creation to emulator
155
+ target = (
156
+ "google.cloud.storage_control_v2.services.storage_control.transports."
157
+ "grpc_asyncio.StorageControlGrpcAsyncIOTransport.create_channel"
158
+ )
159
+ with mock.patch(target) as mock_create:
160
+ mock_create.return_value = mock.Mock() # Return a dummy channel
161
+ yield mock_create
162
163
164
@pytest.fixture(scope="session")
165
def gcs_factory(docker_gcs):
166
params["endpoint_url"] = docker_gcs
0 commit comments