diff --git a/fastpt/test_case/test_project/test_api_test_case_template.py b/fastpt/test_case/test_project/test_api_test_case_template.py index 48d955b..9c7043d 100644 --- a/fastpt/test_case/test_project/test_api_test_case_template.py +++ b/fastpt/test_case/test_project/test_api_test_case_template.py @@ -11,8 +11,11 @@ from fastpt.utils.request.case_data_file_parse import get_request_data from fastpt.utils.request.ids_extract import get_ids -request_data = get_request_data(read_yaml(filename=os.sep.join([PROJECT_NAME, 'api_test_case_template.yaml']))) -allure_text = request_data[0]['config']['allure'] +request_data = get_request_data( + file_data=read_yaml(filename=os.sep.join([PROJECT_NAME, 'api_test_case_template.yaml'])), + use_pydantic_verify=True +) +allure_text = request_data[0]['config']['allure'] # noqa request_ids = get_ids(request_data) diff --git a/fastpt/test_case/test_project/test_only_skip.py b/fastpt/test_case/test_project/test_only_skip.py index cc49570..f45f902 100644 --- a/fastpt/test_case/test_project/test_only_skip.py +++ b/fastpt/test_case/test_project/test_only_skip.py @@ -11,8 +11,11 @@ from fastpt.utils.request.case_data_file_parse import get_request_data from fastpt.utils.request.ids_extract import get_ids -request_data = get_request_data(read_yaml(filename=os.sep.join([PROJECT_NAME, 'only_skip.yml']))) -allure_text = request_data[0]['config']['allure'] +request_data = get_request_data( + file_data=read_yaml(filename=os.sep.join([PROJECT_NAME, 'only_skip.yml'])), + use_pydantic_verify=False +) +allure_text = request_data[0]['config']['allure'] # noqa request_ids = get_ids(request_data) diff --git a/fastpt/test_case/test_project/test_upload_file.py b/fastpt/test_case/test_project/test_upload_file.py index a776064..5568dbf 100644 --- a/fastpt/test_case/test_project/test_upload_file.py +++ b/fastpt/test_case/test_project/test_upload_file.py @@ -11,8 +11,11 @@ from fastpt.utils.request.case_data_file_parse import get_request_data from fastpt.utils.request.ids_extract import get_ids -request_data = get_request_data(read_yaml(filename=os.sep.join([PROJECT_NAME, 'upload_file.yaml']))) -allure_text = request_data[0]['config']['allure'] +request_data = get_request_data( + file_data=read_yaml(filename=os.sep.join([PROJECT_NAME, 'upload_file.yaml'])), + use_pydantic_verify=True +) +allure_text = request_data[0]['config']['allure'] # noqa request_ids = get_ids(request_data) diff --git a/fastpt/utils/case_auto_generator.py b/fastpt/utils/case_auto_generator.py index 8a1d903..bda1fd9 100644 --- a/fastpt/utils/case_auto_generator.py +++ b/fastpt/utils/case_auto_generator.py @@ -79,8 +79,11 @@ def auto_generate_test_cases(rewrite: bool = False) -> NoReturn: from fastpt.utils.request.case_data_file_parse import get_request_data from fastpt.utils.request.ids_extract import get_ids -request_data = get_request_data(read_yaml(filename=os.sep.join([PROJECT_NAME, '{yaml_filename}']))) -allure_text = request_data[0]['config']['allure'] +request_data = get_request_data( + file_data=read_yaml(filename=os.sep.join([PROJECT_NAME, '{yaml_filename}'])), + use_pydantic_verify=False +) +allure_text = request_data[0]['config']['allure'] # noqa request_ids = get_ids(request_data)