From 52e5ecb27951f0758730e3f7b828c3fbd2fb4128 Mon Sep 17 00:00:00 2001 From: Pulkit Aggarwal Date: Mon, 1 Sep 2025 08:03:44 +0000 Subject: [PATCH] chore: fix the gapic unit tests --- owlbot.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/owlbot.py b/owlbot.py index 085466c4e..3829bf0d7 100644 --- a/owlbot.py +++ b/owlbot.py @@ -54,10 +54,18 @@ if renamed_path.exists(): s.replace( - renamed_path / "__init__.py", - "from google.cloud.storage_v2 import gapic_version as package_version", - "from google.cloud._storage_v2 import gapic_version as package_version", - ) + renamed_path / "**/*.py", + "google.cloud.storage_v2", + "google.cloud._storage_v2", + ) + + # Fix imports in the unit tests + s.replace( + "tests/unit/gapic/storage_v2/**/*.py", + "google.cloud.storage_v2", + "google.cloud._storage_v2", + ) + s.remove_staging_dirs()