From 02a2500af07f99a6fa87c25060127ed0c31efa86 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 00:53:20 +0000 Subject: [PATCH] test: add comprehensive test coverage for OpenAPI overrides Co-Authored-By: Chaoyu Yang --- tests/unit/bentoml_io/test_decorators.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/bentoml_io/test_decorators.py b/tests/unit/bentoml_io/test_decorators.py index 9d3597afbbe..fafd951e215 100644 --- a/tests/unit/bentoml_io/test_decorators.py +++ b/tests/unit/bentoml_io/test_decorators.py @@ -142,7 +142,7 @@ def pandas_func( def test_api_decorator_openapi_overrides(): - from bentoml._internal.service import Service + from bentoml._internal.service.factory import Service from bentoml._internal.service.openapi import generate_spec from bentoml._internal.service.openapi.specification import OpenAPISpecification @@ -188,7 +188,7 @@ def predict(self, data: str) -> str: def test_api_decorator_parameter_overrides(): - from bentoml._internal.service import Service + from bentoml._internal.service.factory import Service from bentoml._internal.service.openapi import generate_spec from bentoml._internal.service.openapi.specification import OpenAPISpecification @@ -244,7 +244,7 @@ def list_items(self, data: str) -> str: def test_api_decorator_response_overrides(): - from bentoml._internal.service import Service + from bentoml._internal.service.factory import Service from bentoml._internal.service.openapi import generate_spec from bentoml._internal.service.openapi.specification import OpenAPISpecification @@ -409,7 +409,7 @@ def test_api_decorator_invalid_overrides(): import pytest - from bentoml._internal.service import Service + from bentoml._internal.service.factory import Service from bentoml._internal.service.openapi import generate_spec # Test invalid field name