@@ -264,22 +264,22 @@ def test_post_negative(self, mock_uuid, mock_format_hf_custom_error_message):
264
264
)
265
265
get_hf_model_info .cache_clear ()
266
266
267
- # case 6
268
- self .mock_handler .get_json_body = MagicMock (
269
- return_value = {"model_id" : "test_model_id" }
270
- )
271
- with patch .object (HfApi , "model_info" ) as mock_model_info :
272
- mock_model_info .return_value = MagicMock (
273
- disabled = False , id = "test_model_id" , pipeline_tag = "not-text-generation"
274
- )
275
- self .mock_handler .post ()
276
- self .mock_handler .finish .assert_called_with (
277
- '{"status": 400, "message": "Something went wrong with your request.", '
278
- '"service_payload": {}, "reason": "Unsupported pipeline tag for the chosen '
279
- "model: 'not-text-generation'. AQUA currently supports the following tasks only: "
280
- f'{ ", " .join (ModelTask .values ())} . '
281
- 'Please select a model with a compatible pipeline tag.", "request_id": "###"}'
282
- )
267
+ # # case 6 pipeline Tag
268
+ # self.mock_handler.get_json_body = MagicMock(
269
+ # return_value={"model_id": "test_model_id"}
270
+ # )
271
+ # with patch.object(HfApi, "model_info") as mock_model_info:
272
+ # mock_model_info.return_value = MagicMock(
273
+ # disabled=False, id="test_model_id", pipeline_tag="not-text-generation"
274
+ # )
275
+ # self.mock_handler.post()
276
+ # self.mock_handler.finish.assert_called_with(
277
+ # '{"status": 400, "message": "Something went wrong with your request.", '
278
+ # '"service_payload": {}, "reason": "Unsupported pipeline tag for the chosen '
279
+ # "model: 'not-text-generation'. AQUA currently supports the following tasks only: "
280
+ # f'{", ".join(ModelTask.values())}. '
281
+ # 'Please select a model with a compatible pipeline tag.", "request_id": "###"}'
282
+ # )
283
283
get_hf_model_info .cache_clear ()
284
284
285
285
@patch ("uuid.uuid4" )
0 commit comments