Skip to content

Commit

Permalink
try a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hanouticelina committed Feb 13, 2025
1 parent 6da9770 commit 25ef0db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_inference_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
TranslationOutput,
VisualQuestionAnsweringOutputElement,
ZeroShotClassificationOutputElement,
constants,
hf_hub_download,
)
from huggingface_hub.errors import HfHubHTTPError, ValidationError
Expand Down Expand Up @@ -904,12 +903,16 @@ class TestListDeployedModels(TestBase):
@expect_deprecation("list_deployed_models")
@patch("huggingface_hub.inference._client.get_session")
def test_list_deployed_models_main_frameworks_mock(self, get_session_mock: MagicMock) -> None:
from huggingface_hub import constants

InferenceClient().list_deployed_models()
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:
from huggingface_hub import constants

InferenceClient().list_deployed_models("all")
assert len(get_session_mock.return_value.get.call_args_list) == len(constants.ALL_INFERENCE_API_FRAMEWORKS)

Expand Down

0 comments on commit 25ef0db

Please sign in to comment.