From 5f8f988b90a5f9456a84ee155a1b3553680a15a7 Mon Sep 17 00:00:00 2001 From: Jimmy Shen Date: Thu, 26 Dec 2024 19:53:53 -0800 Subject: [PATCH] better coverage --- tests/stores/test_azure.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/stores/test_azure.py b/tests/stores/test_azure.py index 2aac08e5..01bcba19 100644 --- a/tests/stores/test_azure.py +++ b/tests/stores/test_azure.py @@ -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 @@ -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)