From c432105d1416ab83674f407ee27a5a6de861d1ad Mon Sep 17 00:00:00 2001 From: Zhicheng Zhang Date: Sat, 12 Oct 2024 10:26:36 +0800 Subject: [PATCH] fix bugs --- tests/tools/test_openapi_schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tools/test_openapi_schema.py b/tests/tools/test_openapi_schema.py index 6bb18867..1933e4da 100644 --- a/tests/tools/test_openapi_schema.py +++ b/tests/tools/test_openapi_schema.py @@ -3,8 +3,8 @@ import pytest from modelscope_agent.agents import RolePlay from modelscope_agent.tools.base import TOOL_REGISTRY -from modelscope_agent.tools.openapi_plugin import (OpenAPIPluginTool, - openapi_schema_convert) +from modelscope_agent.tools.openapi_plugin import OpenAPIPluginTool +from modelscope_agent.tools.utils.openapi_utils import openapi_schema_convert from modelscope.utils.config import Config @@ -174,7 +174,7 @@ @pytest.mark.skipif(IS_FORKED_PR, reason='only run modelscope-agent main repo') def test_openapi_schema_tool(): - schema_openAPI['auth']['apikey'] = os.environ['DASHSCOPE_API_KEY'] + schema_openAPI['auth']['apikey'] = os.getenv('DASHSCOPE_API_KEY', '') config_dict = openapi_schema_convert( schema=schema_openAPI['schema'], auth=schema_openAPI['auth']) plugin_cfg = Config(config_dict)