Commit ec235181235688b4164cf7e09594ff30e9810542
1 parent
2c123fba
上传文件
Showing
5 changed files
with
1 additions
and
124 deletions
commons/api/doAudit.py deleted
100644 → 0
1 | -#!/usr/bin/python | |
2 | -# -*- coding: UTF-8 -*- | |
3 | -import requests | |
4 | -import json | |
5 | -import urllib3 | |
6 | -from commons import common as com | |
7 | -from commons.MySession import my | |
8 | -urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
9 | - | |
10 | -class doAudit(): | |
11 | - | |
12 | - url="http://test.trace.diligrp.com:8393/newRegisterBill/doAudit.action?id=5888&verifyStatus=20" | |
13 | - header={ | |
14 | - "Host": "test.trace.diligrp.com", | |
15 | - "Connection": "keep-alive", | |
16 | - "Accept": "application/json,text/javascript,*/*;q=0.01", | |
17 | - "User-Agent": "Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/90.0.4430.212Safari/537.36", | |
18 | - "X-Requested-With": "XMLHttpRequest", | |
19 | - "Referer": "http://test.trace.diligrp.com:8393/newRegisterBill/add.html", | |
20 | - "Accept-Encoding": "gzip,deflate", | |
21 | - "Accept-Language": "zh-CN,zh-TW;q=0.9,zh;q=0.8,en;q=0.7"} | |
22 | - | |
23 | - | |
24 | - def __init__(self): | |
25 | - self.url=doAudit.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") ) | |
26 | - self.header=doAudit.header | |
27 | - | |
28 | - | |
29 | - | |
30 | - | |
31 | -# tt=doAudit() | |
32 | -# re=my.get(url=tt.url,headers=tt.header) | |
33 | -# print(re.json()) | |
34 | 0 | \ No newline at end of file |
config/api/login.conf deleted
100644 → 0
config/api/upStream.conf deleted
100644 → 0
1 | -# -*- coding: UTF-8 -*- | |
2 | -[upStream] | |
3 | -method=post | |
4 | -url=http://test.trace.diligrp.com:8393/upStream/listPage.action | |
5 | -body_format=JSON | |
6 | -header={ | |
7 | - "Host": "test.trace.diligrp.com", | |
8 | - "Connection": "keep-alive", | |
9 | - "Content-Length": "325", | |
10 | - "Accept": "application/json,text/javascript,*/*;q=0.01", | |
11 | - "X-Requested-With": "XMLHttpRequest", | |
12 | - "User-Agent": "Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/90.0.4430.212Safari/537.36", | |
13 | - "Content-Type": "application/json", | |
14 | - "Origin": "http://test.trace.diligrp.com:8393", | |
15 | - "Referer": "http://test.trace.diligrp.com:8393/upStream/index.html", | |
16 | - "Accept-Encoding": "gzip,deflate", | |
17 | - "Accept-Language": "zh-CN,zh-TW;q=0.9,zh;q=0.8,en;q=0.7"} | |
18 | - | |
19 | -[upStream01] | |
20 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
21 | - | |
22 | - | |
23 | -[upStream02] | |
24 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
25 | - | |
26 | - | |
27 | -[upStream03] | |
28 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
29 | - | |
30 | - | |
31 | -[upStream04] | |
32 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
33 | - | |
34 | - | |
35 | -[upStream05] | |
36 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
37 | - | |
38 | - | |
39 | -[upStream06] | |
40 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
41 | - | |
42 | - | |
43 | -[upStream07] | |
44 | -body={"rows":10,"page":1,"sort":"id","order":"desc","metadata":{"created":"{\"provider\":\"datetimeProvider\",\"index\":10,\"field\":\"created\"}","upORdown":"{\"provider\":\"userFlagProvider\",\"index\":20,\"field\":\"upORdown\"}","upstreamType":"{\"provider\":\"upStreamTypeProvider\",\"index\":30,\"field\":\"upstreamType\"}"}} | |
45 | - | |
46 | -expect_response={"code":"200","data":951,"message":"创建客户订单成功","result":"创建客户订单成功","success":true} | |
47 | - | |
48 | - | |
49 | - | |
50 | - | |
51 | - |
config/global_data_backup.backup deleted
100644 → 0
1 | -# -*- coding: UTF-8 -*- | |
2 | - | |
3 | -[account] | |
4 | -user01=sg_wenze&111111 | |
5 | -user02=sgwanggang&111111 | |
6 | -user03=hz_wenze&111111 | |
7 | - | |
8 | -[userId] | |
9 | -user01=210 | |
10 | -user02=87 | |
11 | -user03=256 | |
12 | - | |
13 | -[environment] | |
14 | -en=http://test. | |
15 | - | |
16 | -[mark] | |
17 | -list=["test"] | |
18 | -list1=["p1","P2",1,"test"] | |
19 | - | |
20 | -[Database] | |
21 | -dbhost=10.35.100.34 | |
22 | -dbport=3306 | |
23 | -dbname=dili_trace | |
24 | -dbuser=root | |
25 | -dbpassword=123456 | |
26 | -dbcharset=utf8 | |
27 | - | |
28 | -[email] | |
29 | -list=[] | |
30 | -list1=["lixi@diligrp.com","LI@diligrp.com"] | |
31 | - | |
32 | - | |
33 | - | |
34 | - | |
35 | - | |
36 | - |
testcase/doAudit/test_doAudit.py
... | ... | @@ -97,7 +97,4 @@ if __name__ == "__main__": |
97 | 97 | |
98 | 98 | # unittest.main(verbosity=2) |
99 | 99 | |
100 | -# com.run_one(test_doAudit("test_doAudit_02")) | |
101 | - | |
102 | - dd=db.mysql_selectOne("SELECT * FROM `dili_trace`.register_bill ORDER BY id DESC LIMIT 1") | |
103 | - print(dd) | |
104 | 100 | \ No newline at end of file |
101 | + com.run_one(test_doAudit("test_doAudit_01")) | ... | ... |