新增和修改部分测试用例

This commit is contained in:
floraachy
2024-04-17 16:14:45 +08:00
parent fd9e5b8df1
commit 795b290e66
32 changed files with 971 additions and 401 deletions
+1 -2
View File
@@ -28,10 +28,9 @@ def get_api_data(api_file_path: str, key: str = None):
api_data = []
if os.path.isdir(api_file_path):
logger.debug(f"目标路径是一个目录:{api_file_path}")
api_files = get_files(target=api_file_path, end=".yaml")
api_files = get_files(target=api_file_path, end=".yaml") + get_files(target=api_file_path, end=".yml")
for api_file in api_files:
api_data.append(YamlHandle(filename=api_file).read_yaml)
elif os.path.isfile(api_file_path):
logger.debug(f"目标路径是一个文件:{api_file_path}")
api_data.append(YamlHandle(filename=api_file_path).read_yaml)