From be4943e21abac2a9da9b2664d4454c9a46a426f6 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Thu, 13 Feb 2025 20:25:51 +0100 Subject: [PATCH] fix import --- tests/test_inference_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_inference_client.py b/tests/test_inference_client.py index 97ff78b014..9e3bce32b9 100644 --- a/tests/test_inference_client.py +++ b/tests/test_inference_client.py @@ -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 ( @@ -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: