Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/tox/install_depend_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"azure-core": "1.11.0",
"requests": "2.19.0",
"six": "1.12.0",
"cryptography": "38.0.3",
"cryptography": "41.0.0",
"msal": "1.23.0",
"azure-storage-file-datalake": "12.2.0",
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/identity/azure-identity/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
../../core/azure-core
azure-identity-broker>=1.1.0 ; platform.python_implementation != "PyPy"
azure-identity-broker>=1.1.0 ; platform.python_implementation != "PyPy" and python_version < '3.14.0'
aiohttp>=3.0
typing_extensions>=3.7.2
-e ../../../eng/tools/azure-sdk-tools
11 changes: 4 additions & 7 deletions sdk/identity/azure-identity/tests/test_vscode_credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,12 @@ def test_invalid_auth_record(self):
os.unlink(tmp_file.name)

def test_broker_credential_requirements_not_installed(self):
"""Test that the credential w"""
"""Test that the credential works without the broker installed."""

with patch.dict("sys.modules", {"azure.identity.broker": None}):
with patch("azure.identity.broker.InteractiveBrowserBrokerCredential") as mock_credential:
with pytest.raises(CredentialUnavailableError):
# This should raise an error because the broker requirements are not installed.
VisualStudioCodeCredential().get_token_info("https://management.azure.com/.default")

assert mock_credential.call_count == 0, "InteractiveBrowserBrokerCredential should not be instantiated"
with pytest.raises(CredentialUnavailableError):
# This should raise an error because the broker requirements are not installed.
VisualStudioCodeCredential().get_token_info("https://management.azure.com/.default")


class TestLoadVSCodeAuthRecord:
Expand Down
Loading