Skip to content

Commit b169928

Browse files
Gayathri Srividya RajavarapuGayathri Srividya Rajavarapu
authored andcommitted
test: skip Google/Entra auth tests if optional deps missing
1 parent ff87581 commit b169928

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/catalog/test_rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3364,6 +3364,7 @@ def test_rest_catalog_with_flat_properties_edge_cases(requests_mock, rest_mock,
33643364
else:
33653365
assert token_response["scope"] == expected_scopes
33663366
elif catalog_properties["auth.type"] == "google":
3367+
pytest.importorskip("google.auth", reason="google-auth is required for Google auth tests")
33673368
# Patch google.auth.load_credentials_from_file and google.auth.transport.requests.Request
33683369
with mock.patch("google.auth.load_credentials_from_file") as mock_load_creds, \
33693370
mock.patch("google.auth.transport.requests.Request") as mock_google_request:
@@ -3379,6 +3380,7 @@ def test_rest_catalog_with_flat_properties_edge_cases(requests_mock, rest_mock,
33793380
assert catalog.uri == TEST_URI
33803381
mock_load_creds.assert_called_with("/fake/path.json", scopes=expected_scopes)
33813382
elif catalog_properties["auth.type"] == "entra":
3383+
pytest.importorskip("azure.identity", reason="azure-identity is required for Entra auth tests")
33823384
# Just check that the catalog can be constructed and scopes are passed
33833385
rest_mock.get(
33843386
f"{TEST_URI}v1/config",

0 commit comments

Comments
 (0)