Skip to content

Commit dc5a3a5

Browse files
committed
Fixing failed tests
1 parent 0b696cb commit dc5a3a5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_azure/_token_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def get_aad_credential(self) -> Union[DefaultAzureCredential, ManagedIdentityCre
7171
# Fall back to using the parent implementation
7272
return super().get_aad_credential()
7373

74-
def get_token(self, *scopes: str, claims: str | None = None, tenant_id: str | None = None, enable_cae: bool = False, **kwargs: Any) -> AccessToken:
74+
def get_token(self, *scopes: str, claims: Union[str, None] = None, tenant_id: Union[str, None] = None, enable_cae: bool = False, **kwargs: Any) -> AccessToken:
7575
"""Get the API token. If the token is not available or has expired, refresh the token.
7676
7777
:return: API token

sdk/evaluation/azure-ai-evaluation/tests/e2etests/test_lite_management_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any, Mapping
22
import pytest
33
import logging
4-
from azure.core.credentials import AzureSasCredential, TokenCredential
4+
from azure.core.credentials import AzureSasCredential, TokenCredential, AccessToken
55
from azure.ai.evaluation._azure._clients import LiteMLClient
66

77

@@ -31,7 +31,7 @@ def test_get_token(self, project_scope, azure_cred):
3131
)
3232

3333
token = client.get_token()
34-
assert isinstance(token, str) and len(token) > 0
34+
assert isinstance(token, AccessToken) and len(token) > 0
3535

3636
@pytest.mark.azuretest
3737
@pytest.mark.parametrize("include_credentials", [False, True])

0 commit comments

Comments
 (0)