diff --git a/tests/e2e/bento_new_sdk/test_asgi.py b/tests/e2e/bento_new_sdk/test_asgi.py index 3ff54ac82f1..84ec7b201ac 100644 --- a/tests/e2e/bento_new_sdk/test_asgi.py +++ b/tests/e2e/bento_new_sdk/test_asgi.py @@ -10,8 +10,8 @@ class Model: model = {"hello": "world"} @bentoml.api() - def get(self, key: str) -> str | None: - return self.model.get(key) + def get(self, key: str) -> str: + return self.model.get(key, "") @bentoml.service(metrics={"enabled": False}) @@ -19,7 +19,7 @@ class Service: model = bentoml.depends(Model) @bentoml.api() - def get(self, key: str) -> dict[str, str | None]: + def get(self, key: str) -> dict[str, str]: return {"value": self.model.get(key)}