Skip to content

Commit

Permalink
test: add comprehensive test coverage for OpenAPI overrides
Browse files Browse the repository at this point in the history
Co-Authored-By: Chaoyu Yang <paranoyang@gmail.com>
  • Loading branch information
devin-ai-integration[bot] and parano committed Jan 10, 2025
1 parent 47e39d4 commit 02a2500
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/bentoml_io/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 02a2500

Please sign in to comment.