assertjson_parametersisnotNone,"Unable to find json parameters in request"
returndumps(json_parameters)
return""
defmake_class_path_dict(root_dir):
importos
fromfnmatchimportfnmatch
pattern="*.tavern.yaml"
ret={}
forpath,subdirs,filesinos.walk(root_dir):
fornameinfiles:
iffnmatch(name,pattern):
test_path=os.path.join(path,name)
ret[test_path.replace("/",".")]=test_path
returnret
defclass_to_path(class_name,class_to_path_dic):
fromfnmatchimportfnmatch
forc,pinclass_to_path_dic.items():
iffnmatch(c,"*"+class_name):
returnp
returnNone
if__name__=='__main__':
above_treshold=False
importargparse
parser=argparse.ArgumentParser()
parser.add_argument("path_to_test_dir",type=str,help="Path to test directory for given xml file")
parser.add_argument("xml_file",type=str,help="Path to report file in xml format")
parser.add_argument("--time-threshold",dest="time_threshold",type=float,default=1.0,help="Time threshold for test execution time, tests with execution time greater than threshold will be marked on red.")