|
@@ -111,7 +111,7 @@ class RequestUtil:
|
|
|
url = arg_names['request'].pop("url")
|
|
|
# 发送请求
|
|
|
res = self.send_request(name, method, url, **arg_names['request'])
|
|
|
- #获取接口的请求时间
|
|
|
+ # 获取接口的请求时间
|
|
|
res_time = round(res.elapsed.total_seconds() * 1000, 2)
|
|
|
act_time = read_config_yaml("request", "request_out_time")
|
|
|
print("act_time============",act_time)
|
|
@@ -148,16 +148,6 @@ class RequestUtil:
|
|
|
if js_value:
|
|
|
extract_value = {key: js_value[0]}
|
|
|
write_yaml(extract_value)
|
|
|
- try:
|
|
|
- return_json = res.json()
|
|
|
-
|
|
|
- data = return_json["data"]["result"]
|
|
|
- for i in range(len(data)):
|
|
|
- write_yaml_projectCode({("projectCode" + str(i)): data[i]['projectCode']})
|
|
|
-
|
|
|
- except Exception as e:
|
|
|
- pass
|
|
|
-
|
|
|
# 断言结果
|
|
|
self.assert_result(arg_names['validate'], return_json, return_code)
|
|
|
|