refactor: rename to JsonSchemaTestcaseChecker

This commit is contained in:
debugtalk
2019-12-31 19:03:34 +08:00
parent 50ef9c12a5
commit 4417b98293
2 changed files with 10 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import importlib
import os
from httprunner import exceptions, logger, utils
from httprunner.loader.check import JsonSchemaCommonChecker, JsonSchemaV2Checker
from httprunner.loader.check import JsonSchemaCommonChecker, JsonSchemaTestcaseChecker
from httprunner.loader.load import load_module_functions, load_file, load_dot_env_file, \
load_folder_files
from httprunner.loader.locate import init_project_working_directory, get_project_working_directory
@@ -225,7 +225,7 @@ def load_testcase_v2(raw_testcase):
}
"""
JsonSchemaV2Checker.validate_testcase_format(raw_testcase)
JsonSchemaTestcaseChecker.validate_testcase_v2_format(raw_testcase)
raw_teststeps = raw_testcase.pop("teststeps")
raw_testcase["teststeps"] = [
load_teststep(teststep)

View File

@@ -50,14 +50,16 @@ class JsonSchemaCommonChecker(object):
return True
class JsonSchemaV1Checker(JsonSchemaCommonChecker):
pass
class JsonSchemaV2Checker(JsonSchemaCommonChecker):
class JsonSchemaTestcaseChecker(JsonSchemaCommonChecker):
@staticmethod
def validate_testcase_format(content):
def validate_testcase_v1_format(content):
""" check testcase format v1 if valid
"""
return True
@staticmethod
def validate_testcase_v2_format(content):
""" check testcase format v2 if valid
"""
try: