3.2.0

# 报告.html

Report generated on 07-Aug-2023 at 14:33:03 by pytest-html v3.1.0

## Summary

17 tests ran in 39.28 seconds.

(Un)check the boxes to filter the results.

11 passed, 0 skipped, 6 failed, 0 errors, 0 expected failures, 0 unexpected passes, 30 rerun

## Results

Result | Test | Duration | Links
--- | --- | --- | ---
No results found. Try to check the filters
Failed | test_bpm.py::TestBPM::test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data11-None-None-None-13] | 0.00 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x00000218374128D0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None sql_sentence = None, update_key = None, i = 13 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: > result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) test_bpm.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None def request_all(self, method, url, mime, case_data): if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded" or mime == "urlencoded": return self.bpm_session.request(method=method,url=url, data=case_data) elif mime == "application/json" or mime == "json": return self.bpm_session.request(method=method, url=url, json=case_data) elif mime == "multipart/from-data" or mime == "from-data": return self.bpm_session.request(method=method, url=url, files=case_data) # 判断媒体类型的值是否query或者为params的媒体类型，如果是，使用params关键字传参 elif mime == "query" or mime== "params": return self.bpm_session.request(method=method, url=url, params=case_data) # 判断媒体类型的值是否text/plain或者为text的媒体类型，如果是，使用data关键字传参 elif mime== "text/plain" or mime == "text": return self.bpm_session.request(method=method, url=url, data=case_data) # 判断媒体类型的值是否为application/Json|query或者json|query，如果是，表示地址栏和请求体同时传参 elif mime == "application/Json|query" or mime == "json|query" or "json|params": > return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"]) E TypeError: 'NoneType' object is not subscriptable ..\requests_method\requests_method.py:42: TypeError ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13
Failed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data12-expect_data12-deletee-DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";-None-14] | 0.06 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x00000218375A0E40>('state') E + where <built-in method get of dict object at 0x00000218375A0E40> = {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''}.get E + where {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''}
Failed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data13-expect_data13-delete|select-sql_sentence13-demId-15] | 0.14 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835C15290> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/addOrg', mime = 'application/json' case_data = {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', ...}, expect_data = {'message': '添加组织成功！', 'state': True} sql_type = 'delete|select' sql_sentence = {'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";', 'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";'} update_key = 'demId', i = 15 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) > print("服务器返回的数据", result.json()) E UnboundLocalError: cannot access local variable 'result' where it is not associated with a value test_bpm.py:37: UnboundLocalError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 ()
Failed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data14-expect_data14-None-None-None-16] | 0.08 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x00000218375D5A00>('state') E + where <built-in method get of dict object at 0x00000218375D5A00> = {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'}.get E + where {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'}
Failed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-日渐富有-expect_data15-None-None-None-17] | 0.10 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除组织成功！' == '部分删除成功，其中编码为【日�】的组织不存在；' E - 部分删除成功，其中编码为【日�】的组织不存在； E + 删除组织成功！ test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''}
Failed | test_bpm.py::TestBPM::test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data16-expect_data16-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";-ids-18] | 0.15 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x00000218375A4200>('state') E + where <built-in method get of dict object at 0x00000218375A4200> = {'logId': '1688438087216021504', 'message': '', 'state': False}.get E + where {'logId': '1688438087216021504', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438062826143744'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438067687342080'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438072645009408'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438077460070400'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438082338045952'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438087216021504'}
Rerun | test_bpm.py::TestBPM::test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data11-None-None-None-13] | 0.00 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x00000218374128D0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None sql_sentence = None, update_key = None, i = 13 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: > result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) test_bpm.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None def request_all(self, method, url, mime, case_data): if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded" or mime == "urlencoded": return self.bpm_session.request(method=method,url=url, data=case_data) elif mime == "application/json" or mime == "json": return self.bpm_session.request(method=method, url=url, json=case_data) elif mime == "multipart/from-data" or mime == "from-data": return self.bpm_session.request(method=method, url=url, files=case_data) # 判断媒体类型的值是否query或者为params的媒体类型，如果是，使用params关键字传参 elif mime == "query" or mime== "params": return self.bpm_session.request(method=method, url=url, params=case_data) # 判断媒体类型的值是否text/plain或者为text的媒体类型，如果是，使用data关键字传参 elif mime== "text/plain" or mime == "text": return self.bpm_session.request(method=method, url=url, data=case_data) # 判断媒体类型的值是否为application/Json|query或者json|query，如果是，表示地址栏和请求体同时传参 elif mime == "application/Json|query" or mime == "json|query" or "json|params": > return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"]) E TypeError: 'NoneType' object is not subscriptable ..\requests_method\requests_method.py:42: TypeError ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13
Rerun | test_bpm.py::TestBPM::test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data11-None-None-None-13] | 0.00 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x00000218374128D0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None sql_sentence = None, update_key = None, i = 13 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: > result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) test_bpm.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None def request_all(self, method, url, mime, case_data): if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded" or mime == "urlencoded": return self.bpm_session.request(method=method,url=url, data=case_data) elif mime == "application/json" or mime == "json": return self.bpm_session.request(method=method, url=url, json=case_data) elif mime == "multipart/from-data" or mime == "from-data": return self.bpm_session.request(method=method, url=url, files=case_data) # 判断媒体类型的值是否query或者为params的媒体类型，如果是，使用params关键字传参 elif mime == "query" or mime== "params": return self.bpm_session.request(method=method, url=url, params=case_data) # 判断媒体类型的值是否text/plain或者为text的媒体类型，如果是，使用data关键字传参 elif mime== "text/plain" or mime == "text": return self.bpm_session.request(method=method, url=url, data=case_data) # 判断媒体类型的值是否为application/Json|query或者json|query，如果是，表示地址栏和请求体同时传参 elif mime == "application/Json|query" or mime == "json|query" or "json|params": > return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"]) E TypeError: 'NoneType' object is not subscriptable ..\requests_method\requests_method.py:42: TypeError ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13
Rerun | test_bpm.py::TestBPM::test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data11-None-None-None-13] | 0.00 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x00000218374128D0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None sql_sentence = None, update_key = None, i = 13 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: > result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) test_bpm.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None def request_all(self, method, url, mime, case_data): if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded" or mime == "urlencoded": return self.bpm_session.request(method=method,url=url, data=case_data) elif mime == "application/json" or mime == "json": return self.bpm_session.request(method=method, url=url, json=case_data) elif mime == "multipart/from-data" or mime == "from-data": return self.bpm_session.request(method=method, url=url, files=case_data) # 判断媒体类型的值是否query或者为params的媒体类型，如果是，使用params关键字传参 elif mime == "query" or mime== "params": return self.bpm_session.request(method=method, url=url, params=case_data) # 判断媒体类型的值是否text/plain或者为text的媒体类型，如果是，使用data关键字传参 elif mime== "text/plain" or mime == "text": return self.bpm_session.request(method=method, url=url, data=case_data) # 判断媒体类型的值是否为application/Json|query或者json|query，如果是，表示地址栏和请求体同时传参 elif mime == "application/Json|query" or mime == "json|query" or "json|params": > return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"]) E TypeError: 'NoneType' object is not subscriptable ..\requests_method\requests_method.py:42: TypeError ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13
Rerun | test_bpm.py::TestBPM::test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data11-None-None-None-13] | 0.00 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x00000218374128D0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None sql_sentence = None, update_key = None, i = 13 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: > result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) test_bpm.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None def request_all(self, method, url, mime, case_data): if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded" or mime == "urlencoded": return self.bpm_session.request(method=method,url=url, data=case_data) elif mime == "application/json" or mime == "json": return self.bpm_session.request(method=method, url=url, json=case_data) elif mime == "multipart/from-data" or mime == "from-data": return self.bpm_session.request(method=method, url=url, files=case_data) # 判断媒体类型的值是否query或者为params的媒体类型，如果是，使用params关键字传参 elif mime == "query" or mime== "params": return self.bpm_session.request(method=method, url=url, params=case_data) # 判断媒体类型的值是否text/plain或者为text的媒体类型，如果是，使用data关键字传参 elif mime== "text/plain" or mime == "text": return self.bpm_session.request(method=method, url=url, data=case_data) # 判断媒体类型的值是否为application/Json|query或者json|query，如果是，表示地址栏和请求体同时传参 elif mime == "application/Json|query" or mime == "json|query" or "json|params": > return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"]) E TypeError: 'NoneType' object is not subscriptable ..\requests_method\requests_method.py:42: TypeError ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13
Rerun | test_bpm.py::TestBPM::test_bpm[get-http://120.46.172.186:8080/refresh-None-None-expect_data11-None-None-None-13] | 0.00 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x00000218374128D0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None, expect_data = {'message': '刷新token成功'}, sql_type = None sql_sentence = None, update_key = None, i = 13 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: > result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) test_bpm.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'get' url = 'http://120.46.172.186:8080/refresh', mime = None, case_data = None def request_all(self, method, url, mime, case_data): if mime == "application/x-www-form-urlencoded" or mime == "x-www-form-urlencoded" or mime == "urlencoded": return self.bpm_session.request(method=method,url=url, data=case_data) elif mime == "application/json" or mime == "json": return self.bpm_session.request(method=method, url=url, json=case_data) elif mime == "multipart/from-data" or mime == "from-data": return self.bpm_session.request(method=method, url=url, files=case_data) # 判断媒体类型的值是否query或者为params的媒体类型，如果是，使用params关键字传参 elif mime == "query" or mime== "params": return self.bpm_session.request(method=method, url=url, params=case_data) # 判断媒体类型的值是否text/plain或者为text的媒体类型，如果是，使用data关键字传参 elif mime== "text/plain" or mime == "text": return self.bpm_session.request(method=method, url=url, data=case_data) # 判断媒体类型的值是否为application/Json|query或者json|query，如果是，表示地址栏和请求体同时传参 elif mime == "application/Json|query" or mime == "json|query" or "json|params": > return self.bpm_session.request(method=method, url=url, params=case_data["query"], json=case_data["body"]) E TypeError: 'NoneType' object is not subscriptable ..\requests_method\requests_method.py:42: TypeError ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13 ------------------------------Captured stdout call------------------------------ Excel中写的数据 get http://120.46.172.186:8080/refresh None None {'message': '刷新token成功'} None None None 13
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data12-expect_data12-deletee-DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";-None-14] | 3.09 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183757B2C0>('state') E + where <built-in method get of dict object at 0x000002183757B2C0> = {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''}.get E + where {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data12-expect_data12-deletee-DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";-None-14] | 0.07 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183755CE40>('state') E + where <built-in method get of dict object at 0x000002183755CE40> = {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''}.get E + where {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data12-expect_data12-deletee-DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";-None-14] | 0.05 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000021837502200>('state') E + where <built-in method get of dict object at 0x0000021837502200> = {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''}.get E + where {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data12-expect_data12-deletee-DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";-None-14] | 0.05 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000021837586200>('state') E + where <built-in method get of dict object at 0x0000021837586200> = {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''}.get E + where {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/demension/v1/dem/addDem-application/json-case_data12-expect_data12-deletee-DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";-None-14] | 0.05 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000021837599980>('state') E + where <built-in method get of dict object at 0x0000021837599980> = {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''}.get E + where {'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'state': False, 'value': ''} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021837413050> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/demension/v1/dem/addDem', mime = 'application/json' case_data = {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'}, expect_data = {'message': '添加维度成功！', 'state': True} sql_type = 'deletee', sql_sentence = 'DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = None, i = 14 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/demension/v1/dem/addDem application/json {'code': '暴富的子维度', 'description': 'gogo', 'isDefault': 0, 'name': '暴富的子维度'} {'state': True, 'message': '添加维度成功！'} deletee DELETE FROM uc_demension WHERE `CODE_`="暴富的子维度"; None 14 服务器返回的数据 {'state': False, 'message': '添加维度失败，维度编码【暴富的子维度】在系统中已存在！', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data13-expect_data13-delete|select-sql_sentence13-demId-15] | 0.14 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835C15290> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/addOrg', mime = 'application/json' case_data = {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', ...}, expect_data = {'message': '添加组织成功！', 'state': True} sql_type = 'delete|select' sql_sentence = {'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";', 'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";'} update_key = 'demId', i = 15 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) > print("服务器返回的数据", result.json()) E UnboundLocalError: cannot access local variable 'result' where it is not associated with a value test_bpm.py:37: UnboundLocalError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 ()
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data13-expect_data13-delete|select-sql_sentence13-demId-15] | 0.22 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835C15290> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/addOrg', mime = 'application/json' case_data = {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', ...}, expect_data = {'message': '添加组织成功！', 'state': True} sql_type = 'delete|select' sql_sentence = {'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";', 'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";'} update_key = 'demId', i = 15 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) > print("服务器返回的数据", result.json()) E UnboundLocalError: cannot access local variable 'result' where it is not associated with a value test_bpm.py:37: UnboundLocalError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 ()
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data13-expect_data13-delete|select-sql_sentence13-demId-15] | 0.12 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835C15290> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/addOrg', mime = 'application/json' case_data = {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', ...}, expect_data = {'message': '添加组织成功！', 'state': True} sql_type = 'delete|select' sql_sentence = {'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";', 'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";'} update_key = 'demId', i = 15 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) > print("服务器返回的数据", result.json()) E UnboundLocalError: cannot access local variable 'result' where it is not associated with a value test_bpm.py:37: UnboundLocalError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 ()
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data13-expect_data13-delete|select-sql_sentence13-demId-15] | 0.14 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835C15290> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/addOrg', mime = 'application/json' case_data = {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', ...}, expect_data = {'message': '添加组织成功！', 'state': True} sql_type = 'delete|select' sql_sentence = {'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";', 'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";'} update_key = 'demId', i = 15 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) > print("服务器返回的数据", result.json()) E UnboundLocalError: cannot access local variable 'result' where it is not associated with a value test_bpm.py:37: UnboundLocalError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 ()
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/addOrg-application/json-case_data13-expect_data13-delete|select-sql_sentence13-demId-15] | 0.13 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835C15290> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/addOrg', mime = 'application/json' case_data = {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', ...}, expect_data = {'message': '添加组织成功！', 'state': True} sql_type = 'delete|select' sql_sentence = {'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";', 'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";'} update_key = 'demId', i = 15 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) > print("服务器返回的数据", result.json()) E UnboundLocalError: cannot access local variable 'result' where it is not associated with a value test_bpm.py:37: UnboundLocalError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': '不知道', 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 () ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/addOrg application/json {'code': '日渐富有', 'demId': None, 'exceedLimitNum': 0, 'grade': '', 'limitNum': 0, 'name': '组织', 'nowNum': 0, 'orderNo': 0, 'parentId': '0'} {'state': True, 'message': '添加组织成功！'} delete|select {'select': 'SELECT ID_ FROM uc_demension WHERE `CODE_`="日渐富有";', 'delete': 'DELETE FROM uc_org WHERE `CODE_`="日渐富有";'} demId 15 ()
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data14-expect_data14-None-None-None-16] | 0.05 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183755D2C0>('state') E + where <built-in method get of dict object at 0x000002183755D2C0> = {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'}.get E + where {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data14-expect_data14-None-None-None-16] | 0.05 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183757A3C0>('state') E + where <built-in method get of dict object at 0x000002183757A3C0> = {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'}.get E + where {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data14-expect_data14-None-None-None-16] | 0.07 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183755BD80>('state') E + where <built-in method get of dict object at 0x000002183755BD80> = {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'}.get E + where {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data14-expect_data14-None-None-None-16] | 0.04 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x00000218374EA140>('state') E + where <built-in method get of dict object at 0x00000218374EA140> = {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'}.get E + where {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams-application/json|query-case_data14-expect_data14-None-None-None-16] | 0.05 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x00000218375C2500>('state') E + where <built-in method get of dict object at 0x00000218375C2500> = {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'}.get E + where {'message': '保存失败,请将参数填写完整', 'state': False, 'value': '根据输入的组织编码没有找到对应的组织信息！'} = <bound method Response.json of <Response [200]>>() E + where <bound method Response.json of <Response [200]>> = <Response [200]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x0000021835D31D90> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams', mime = 'application/json|query' case_data = {'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00...'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}], 'query': {'orgCode': '日渐富有'}} expect_data = {'message': '保存组织参数成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 16 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/orgParam/saveOrgParams application/json|query {'query': {'orgCode': '日渐富有'}, 'body': [{'alias': 'sz', 'value': 0}, {'alias': 'zy', 'value': 'math'}, {'alias': 'rq', 'value': '2023-08-04T16:00:00.000Z'}, {'alias': 'ah', 'value': 'lq'}, {'alias': 'yyyy', 'value': '越高越好'}, {'alias': 'xb', 'value': '2'}]} {'state': True, 'message': '保存组织参数成功！'} None None None 16 服务器返回的数据 {'state': False, 'message': '保存失败,请将参数填写完整', 'value': '根据输入的组织编码没有找到对应的组织信息！'}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-日渐富有-expect_data15-None-None-None-17] | 0.13 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除组织成功！' == '部分删除成功，其中编码为【日�】的组织不存在；' E - 部分删除成功，其中编码为【日�】的组织不存在； E + 删除组织成功！ test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-日渐富有-expect_data15-None-None-None-17] | 0.08 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除组织成功！' == '部分删除成功，其中编码为【日�】的组织不存在；' E - 部分删除成功，其中编码为【日�】的组织不存在； E + 删除组织成功！ test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-日渐富有-expect_data15-None-None-None-17] | 0.09 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除组织成功！' == '部分删除成功，其中编码为【日�】的组织不存在；' E - 部分删除成功，其中编码为【日�】的组织不存在； E + 删除组织成功！ test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-日渐富有-expect_data15-None-None-None-17] | 0.09 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除组织成功！' == '部分删除成功，其中编码为【日�】的组织不存在；' E - 部分删除成功，其中编码为【日�】的组织不存在； E + 删除组织成功！ test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/api/org/v1/org/deleteOrg-text/plain-日渐富有-expect_data15-None-None-None-17] | 0.09 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert '删除组织成功！' == '部分删除成功，其中编码为【日�】的组织不存在；' E - 部分删除成功，其中编码为【日�】的组织不存在； E + 删除组织成功！ test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740EBD0> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'post' url = 'http://120.46.172.186:8080/api/org/v1/org/deleteOrg', mime = 'text/plain', case_data = '日渐富有' expect_data = {'message': '删除组织成功！', 'state': True}, sql_type = None, sql_sentence = None, update_key = None, i = 17 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''} ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/api/org/v1/org/deleteOrg text/plain 日渐富有 {'state': True, 'message': '删除组织成功！'} None None None 17 服务器返回的数据 {'state': True, 'message': '部分删除成功，其中编码为【日�】的组织不存在；', 'value': ''}
Rerun | test_bpm.py::TestBPM::test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data16-expect_data16-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";-ids-18] | 0.14 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000021837191280>('state') E + where <built-in method get of dict object at 0x0000021837191280> = {'logId': '1688438062826143744', 'message': '', 'state': False}.get E + where {'logId': '1688438062826143744', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438062826143744'}
Rerun | test_bpm.py::TestBPM::test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data16-expect_data16-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";-ids-18] | 0.15 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000021837558FC0>('state') E + where <built-in method get of dict object at 0x0000021837558FC0> = {'logId': '1688438067687342080', 'message': '', 'state': False}.get E + where {'logId': '1688438067687342080', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438062826143744'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438067687342080'}
Rerun | test_bpm.py::TestBPM::test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data16-expect_data16-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";-ids-18] | 0.15 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183755D400>('state') E + where <built-in method get of dict object at 0x000002183755D400> = {'logId': '1688438072645009408', 'message': '', 'state': False}.get E + where {'logId': '1688438072645009408', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438062826143744'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438067687342080'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438072645009408'}
Rerun | test_bpm.py::TestBPM::test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data16-expect_data16-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";-ids-18] | 0.12 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x000002183740ECC0>('state') E + where <built-in method get of dict object at 0x000002183740ECC0> = {'logId': '1688438077460070400', 'message': '', 'state': False}.get E + where {'logId': '1688438077460070400', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438062826143744'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438067687342080'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438072645009408'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438077460070400'}
Rerun | test_bpm.py::TestBPM::test_bpm[DELETE-http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds-query-case_data16-expect_data16-select-SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";-ids-18] | 0.15 |
self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): > assert expect_data[key] == result.json().get(key) E AssertionError: assert True == False E + where False = <built-in method get of dict object at 0x0000021837598E80>('state') E + where <built-in method get of dict object at 0x0000021837598E80> = {'logId': '1688438082338045952', 'message': '', 'state': False}.get E + where {'logId': '1688438082338045952', 'message': '', 'state': False} = <bound method Response.json of <Response [500]>>() E + where <bound method Response.json of <Response [500]>> = <Response [500]>.json test_bpm.py:41: AssertionError During handling of the above exception, another exception occurred: self = <homewoke.接口pytest框架.case_data.test_bpm.TestBPM object at 0x000002183740C450> db_fix = <homewoke.接口pytest框架.common.read_db.DB object at 0x0000021837488ED0> my_rep = <homewoke.接口pytest框架.requests_method.requests_method.RequestsMethod object at 0x0000021837195F90>, method = 'DELETE' url = 'http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds', mime = 'query', case_data = {'ids': '1688197155442933760'} expect_data = {'message': '删除维度成功', 'state': True}, sql_type = 'select' sql_sentence = 'SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度";', update_key = 'ids', i = 18 @pytest.mark.parametrize("method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key,i", ReadExcel().get_data()) def test_bpm(self, db_fix, my_rep, method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i): print("Excel中写的数据", method, url, mime, case_data, expect_data,sql_type, sql_sentence, update_key, i) if sql_type == "delete": db_fix.delete(sql_sentence) please_result = my_rep.request_all(method=method, url=url, mime=mime,case_data=case_data) print("服务器返回的数据", please_result.text) elif sql_type == "select": select_result = db_fix.select(sql_sentence) case_data[update_key] = select_result result = my_rep.request_all(method=method,url=url, mime=mime, case_data=case_data) elif sql_type == "select|delete" or sql_type == "delete|select": #添加组织先执行删除的sql语句. 这里的sql语句存放在一个字典中， 字典的格式为：{"delete":"删除sql语句", "select":"查询sql语句"} db_fix.delete(sql_sentence["delete"]) select_result = db_fix.select(sql_sentence["select"]) case_data[update_key] = select_result else: result = my_rep.request_all(method=method,url=url,mime=mime,case_data=case_data) print("服务器返回的数据", result.json()) try: for key in expect_data.keys(): assert expect_data[key] == result.json().get(key) except: > raise AssertionError("断言失败") E AssertionError: 断言失败 test_bpm.py:43: AssertionError ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '不知道'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438062826143744'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438067687342080'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438072645009408'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438077460070400'} ------------------------------Captured stdout call------------------------------ Excel中写的数据 DELETE http://120.46.172.186:8080/api/demension/v1/dem/deleteDemByIds query {'ids': '1688197155442933760'} {'state': True, 'message': '删除维度成功'} select SELECT ID_ FROM uc_demension WHERE `CODE_`="暴富的子维度"; ids 18 (('1688197155442933760',),) 服务器返回的数据 {'state': False, 'message': '', 'logId': '1688438082338045952'}
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data0-expect_data0-None-None-None-2] | 0.56 |
-----------------------------Captured stdout setup------------------------------ D:\pythonProject1\homewoke\接口pytest框架\file_data <configparser.ConfigParser object at 0x0000021837488FD0> D:\pythonProject1\homewoke\接口pytest框架\file_data <configparser.ConfigParser object at 0x000002183744BB10> ------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'admin'} {'username': '超级管理员', 'account': 'admin'} None None None 2 服务器返回的数据 {'token': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInRlbmFudElkIjoiLTEiLCJleHAiOjE2OTE0NzYzNDYsImlhdCI6MTY5MTM4OTk0Nn0.bYumzzA-jRHym9xwCpjOR8iVukN4YQAVVIPAgA6YTW3_o9DasEHw9dCWyLZkzsBle5AM-jv4CGy08MqCTCEJSQ', 'username': '超级管理员', 'account': 'admin', 'userId': '1', 'expiration': 86400, 'loginStatus': True, 'userAttrs': {'tenantId': '-1'}} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data1-expect_data1-None-None-None-3] | 0.05 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': ''} {'state': False, 'message': '账号或密码错误'} None None None 3 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437928134459392'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data2-expect_data2-None-None-None-4] | 0.09 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'adminadminadminadminadminadmin'} {'state': False, 'message': '账号或密码错误'} None None None 4 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437928558084096'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data3-expect_data3-None-None-None-5] | 0.09 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'a'} {'state': False, 'message': '账号或密码错误'} None None None 5 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437928935571456'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data4-expect_data4-None-None-None-6] | 0.09 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': '▂▃▄▅▆▇█'} {'state': False, 'message': '账号或密码错误'} None None None 6 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437929375973376'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data5-expect_data5-None-None-None-7] | 0.08 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2', 'username': 'tom'} {'state': False, 'message': '账号或密码错误'} None None None 7 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437929761849344'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data6-expect_data6-None-None-None-8] | 0.10 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': '', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None 8 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437930193862656'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data7-expect_data7-None-None-None-9] | 0.10 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2MTIzNDU2', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None 9 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437930634264576'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data8-expect_data8-None-None-None-10] | 0.11 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': 'M', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None 10 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437931108220928'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data9-expect_data9-None-None-None-11] | 0.11 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': '▂▃▄▅▆▇█', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None 11 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437931569594368'} 断言成功
Passed | test_bpm.py::TestBPM::test_bpm[post-http://120.46.172.186:8080/auth-application/json-case_data10-expect_data10-None-None-None-12] | 0.14 |
------------------------------Captured stdout call------------------------------ Excel中写的数据 post http://120.46.172.186:8080/auth application/json {'password': '2', 'username': 'admin'} {'state': False, 'message': '账号或密码错误'} None None None 12 服务器返回的数据 {'state': False, 'message': '账号或密码错误', 'logId': '1688437932177768448'} 断言成功