Skip to content

Commit

Permalink
better coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmshn-ms committed Dec 27, 2024
1 parent 5bcd14e commit 5f8f988
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/stores/test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,18 +428,17 @@ def test_credential_type_valid():
store = AzureBlobStore(
index,
AZURITE_CONTAINER_NAME,
azure_client_info="client_url",
credential_type=credential_type,
)
assert store.credential_type == credential_type

credential_type = "AzureCliCredential"
index = MemoryStore("index")
store = AzureBlobStore(
index,
AZURITE_CONTAINER_NAME,
credential_type=credential_type,
)
assert store.credential_type == credential_type
# tricks the store into thinking you already
# provided the blob service client so it skips
# the connection checks. We are only testing that
# the credential import works properly
store.service = True
store.connect()

from azure.identity import DefaultAzureCredential

Expand All @@ -448,6 +447,7 @@ def test_credential_type_valid():
store = AzureBlobStore(
index,
AZURITE_CONTAINER_NAME,
azure_client_info="client_url",
credential_type=credential_type,
)
assert not isinstance(store.credential_type, str)

0 comments on commit 5f8f988

Please sign in to comment.