【unittest+testcase参数化】
上一篇 / 下一篇 2020-05-22 11:14:46 / 个人分类:环境搭建
TAG:
- 引用 删除 ITgirl范范 / 2021-08-30 18:10:10
-
def setUp(self):
pass
headers = {"Accept": "*/*", "sso-token": login.get_Session(),
"Content-Type": "application/json;charset=UTF-8",
"huohua-podenv": variable.env}
huohua = huohuaDict
for case in huohua:
case = case
c = [(getDicParam.getParam(case, huohua)[2],getDicParam.getParam(case, huohua)[1],getDicParam.getParam(case, huohua)[3])]
@parameterized.parameterized.expand(c)
def test_case(self,url,data,method):
# 若请求是 get 则调用 get 方法,post 类似
if method is 'get':
rep = request_method.get_request(url,data,self.headers)
else:
rep = request_method.post_request(url,json.dumps(data),self.headers)
print(rep)
标题搜索
日历
|
|||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
1 | 2 | 3 | 4 | 5 | 6 | ||||
7 | 8 | 9 | 10 | 11 | 12 | 13 | |||
14 | 15 | 16 | 17 | 18 | 19 | 20 | |||
21 | 22 | 23 | 24 | 25 | 26 | 27 | |||
28 | 29 | 30 |
我的存档
数据统计
- 访问量: 100774
- 日志数: 53
- 图片数: 1
- 文件数: 4
- 建立时间: 2016-02-15
- 更新时间: 2023-03-21