Skip to content

Commit f53eeec

Browse files
authored
[FIX] Update Azure KeyVault dash_to_underscore test to explicitly enable the feature
1 parent ffeb186 commit f53eeec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_source_azure_key_vault.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def _raise_resource_not_found_when_getting_parent_secret_name(self, secret_name:
161161

162162
return key_vault_secret
163163

164-
def test_dash_to_underscore_translation_enabled_by_default(self, mocker: MockerFixture) -> None:
164+
def test_dash_to_underscore_translation(self, mocker: MockerFixture) -> None:
165165
"""Test that dashes in secret names are mapped to underscores in field names."""
166166

167167
class AzureKeyVaultSettings(BaseSettings):
@@ -182,7 +182,10 @@ class AzureKeyVaultSettings(BaseSettings):
182182
)
183183

184184
obj = AzureKeyVaultSettingsSource(
185-
AzureKeyVaultSettings, 'https://my-resource.vault.azure.net/', DefaultAzureCredential()
185+
AzureKeyVaultSettings,
186+
'https://my-resource.vault.azure.net/',
187+
DefaultAzureCredential(),
188+
dash_to_underscore=True,
186189
)
187190

188191
settings = obj()

0 commit comments

Comments
 (0)