Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina committed Feb 13, 2025
1 parent 90099ba commit be4943e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_inference_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
TranslationOutput,
VisualQuestionAnsweringOutputElement,
ZeroShotClassificationOutputElement,
constants,
hf_hub_download,
)
from huggingface_hub.constants import ALL_INFERENCE_API_FRAMEWORKS, MAIN_INFERENCE_API_FRAMEWORKS
from huggingface_hub.errors import HfHubHTTPError, ValidationError
from huggingface_hub.inference._client import _open_as_binary
from huggingface_hub.inference._common import (
Expand Down Expand Up @@ -905,13 +905,13 @@ class TestListDeployedModels(TestBase):
@patch("huggingface_hub.inference._client.get_session")
def test_list_deployed_models_main_frameworks_mock(self, get_session_mock: MagicMock) -> None:
InferenceClient().list_deployed_models()
assert len(get_session_mock.return_value.get.call_args_list) == len(MAIN_INFERENCE_API_FRAMEWORKS)
assert len(get_session_mock.return_value.get.call_args_list) == len(constants.MAIN_INFERENCE_API_FRAMEWORKS)

@expect_deprecation("list_deployed_models")
@patch("huggingface_hub.inference._client.get_session")
def test_list_deployed_models_all_frameworks_mock(self, get_session_mock: MagicMock) -> None:
InferenceClient().list_deployed_models("all")
assert len(get_session_mock.return_value.get.call_args_list) == len(ALL_INFERENCE_API_FRAMEWORKS)
assert len(get_session_mock.return_value.get.call_args_list) == len(constants.ALL_INFERENCE_API_FRAMEWORKS)

@expect_deprecation("list_deployed_models")
def test_list_deployed_models_single_frameworks(self) -> None:
Expand Down

0 comments on commit be4943e

Please sign in to comment.