Skip to content

Commit 5f8f988

Browse files
committed
better coverage
1 parent 5bcd14e commit 5f8f988

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/stores/test_azure.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -428,18 +428,17 @@ def test_credential_type_valid():
428428
store = AzureBlobStore(
429429
index,
430430
AZURITE_CONTAINER_NAME,
431+
azure_client_info="client_url",
431432
credential_type=credential_type,
432433
)
433434
assert store.credential_type == credential_type
434435

435-
credential_type = "AzureCliCredential"
436-
index = MemoryStore("index")
437-
store = AzureBlobStore(
438-
index,
439-
AZURITE_CONTAINER_NAME,
440-
credential_type=credential_type,
441-
)
442-
assert store.credential_type == credential_type
436+
# tricks the store into thinking you already
437+
# provided the blob service client so it skips
438+
# the connection checks. We are only testing that
439+
# the credential import works properly
440+
store.service = True
441+
store.connect()
443442

444443
from azure.identity import DefaultAzureCredential
445444

@@ -448,6 +447,7 @@ def test_credential_type_valid():
448447
store = AzureBlobStore(
449448
index,
450449
AZURITE_CONTAINER_NAME,
450+
azure_client_info="client_url",
451451
credential_type=credential_type,
452452
)
453453
assert not isinstance(store.credential_type, str)

0 commit comments

Comments
 (0)