Skip to content

Commit

Permalink
fix: fix ValueError in test__validate_universe_domain (#743)
Browse files Browse the repository at this point in the history
* fix: fix `ValueError` in `test__validate_universe_domain`

PiperOrigin-RevId: 604699565

Source-Link: googleapis/googleapis@cd3eabf

Source-Link: googleapis/googleapis-gen@01f69ba
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDFmNjliYTdhMTNkNTllNmY0NWUyNDMzNTliOTFhNmU4OTYyMjFmOCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 7, 2024
1 parent ea4c1f4 commit 9d8ad7e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions tests/unit/gapic/bigquery_storage_v1/test_big_query_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -337,8 +337,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/gapic/bigquery_storage_v1/test_big_query_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -353,8 +353,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -339,8 +339,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -353,8 +353,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down

0 comments on commit 9d8ad7e

Please sign in to comment.