示例#1
0
 def test06(self):
     """判断当前自然月员工价值权重是否提醒维护薪资区间"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params("company_datas.yaml", "判断当前自然月员工价值权重是否提醒维护薪资区间")
     r = a.request(csurl, method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#2
0
 def test01(self):
     """查询上个自然月客户数量"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params("company_datas.yaml", "查询上个自然月客户数量")
     r = a.request(csurl, method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#3
0
 def test07(self):
     """保存当前自然月员工价值权重设置"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params("company_datas.yaml", "保存当前自然月员工价值权重设置")
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#4
0
 def test05(self):
     """查看环形图"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params("statistics.yaml", "查看环形图")
     data = {"componentId": "%s" % getattr(result, 'huanxingid')}
     r = a.request(csurl, method, json=data, headers=head)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
 def test22(self):
     """角色详情修改"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "permission_manage.yaml", "角色详情修改")
     data = {
         "roleFuncVoList": [{
             "idKey": "-6",
             "moduleCode": "task",
             "moduleFuncCode": None,
             "moduleFuncId": None,
             "moduleId": "-6",
             "name": "任务",
             "type": 1,
             "parentId": None
         }, {
             "idKey": "-10018",
             "moduleCode": "task",
             "moduleFuncCode": "/task/listAll",
             "moduleFuncId": "-10018",
             "moduleId": "-6",
             "name": "全部任务",
             "type": 2,
             "parentId": "-6"
         }],
         "roleId":
         "%s" % getattr(result, 'ceshi_role_id')
     }
     r = a.request(csurl, method, json=data, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#6
0
 def test05(self):
     """模块数据权限查询(新增、查看)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "模块数据权限查询(新增、查看)")
     r = a.request(csurl, method, params=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
示例#7
0
 def test011_merge_result(self):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('merge.yaml', func_name)
     a = RestClient(rooturl)
     res = a.request(url=csurl, method=method, json=yamlvalue['data'], headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
     pytest.assume('"yihuikuanjine":"77"' in res.text)
示例#8
0
 def test06(self):
     """首页删除卡片"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params("component.yaml", "首页删除卡片")
     param = {"componentId": getattr(result, 'component_id_kp'), "location": 0, "panelId": getattr(result,
                                                                                                   'panelid')}
     r = a.request(csurl, method, params=param, headers=head)
     check_codes_msg(r, yamlvalue, mainkey)
示例#9
0
 def test06(self):
     """删除导航菜单(关联模块,范围全部)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "navigation_menu.yaml", "删除导航菜单(关联模块,范围全部)")
     r = a.request(csurl + getattr(result, 'menuid'), method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
示例#10
0
 def test21(self, insert_module_data):
     """删除第二条表单数据"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "删除第二条表单数据")
     r = a.request(csurl + insert_module_data[1], method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
示例#11
0
 def delete_datas(self,module_name,id):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('merge.yaml', func_name)
     a = RestClient(rooturl)
     csurl = f'{csurl}/{module_name}/{id}'
     res = a.request(url=csurl, method=method, headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
 def test08(self):
     """添加字段(单行文本)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_manage.yaml", "添加字段(单行文本)")
     data = {
         "moduleId": "%s" % getattr(result, 'id'),
         "name": "单行文本",
         "code": "",
         "type": 0,
         "componentId": 1,
         "placeholder": "",
         "description": "",
         "layout": 0,
         "required": False,
         "repeated": False,
         "sequence": 104,
         "extendJson": {
             "default": "",
             "length": 18
         },
         "onlyRead": 0
     }
     r = a.request(csurl, method, json=data, headers=head)
     setattr(result, 'ziduanxinxi', json.loads(r.text)['data'])
     setattr(result, 'fieldid', json.loads(r.text)['data']['id'])
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#13
0
 def test005_target_screen_mapping(self):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('mapping.yaml', func_name)
     a = RestClient(rooturl)
     url = csurl + '756585727382392833'
     res = a.request(url=url, method=method, headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
示例#14
0
 def test01(self):
     """新增统计目录"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params("statistics.yaml", "新增统计目录")
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     setattr(result, 'menuid', json.loads(r.text)['data']['id'])
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#15
0
 def test009_add_target_condition(self):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('merge.yaml', func_name)
     a = RestClient(rooturl)
     res = a.request(url=csurl, method=method, json=yamlvalue['data'], headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
     check_datas(res, yamlvalue)
示例#16
0
 def test09(self):
     """指定字段值不触发(开票申请新增 -- 指定值12)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "assign-field-values.yaml", "指定字段值不触发(开票申请新增 -- 指定值12)")
     xz_r = a.request(csurl[0],
                      method,
                      json=yamlvalue['data'],
                      headers=head)
     _id = xz_r.json()['data']['_id']
     cx_data = {
         "field": "",
         "order": "",
         "conditions": {},
         "pagination": {
             "pageIndex": 1
         },
         "complexConditions": [],
         "pageSize": 10,
         "pageIndex": 1
     }
     # 查询数据
     cx_r = a.request(csurl[1], method, json=cx_data, headers=head)
     # convert_json_to_yaml(cx_r.text, yaml_path, mainkey)
     # 删除数据
     sc_r = a.request(csurl[2] + _id, 'delete', headers=head)
     if sc_r.status_code == 200:
         print("开票申请删除数据成功")
     else:
         raise Exception("数据删除失败")
     check_codes_msg(cx_r, yamlvalue, mainkey)
     check_datas(cx_r, yamlvalue)
示例#17
0
 def test18(self, insert_module_data):
     """第一条数据的数据分配(分配给测试人员)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "第一条数据的数据分配(分配给测试人员)")
     yamlvalue['data']['ids'].append(insert_module_data[0])
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
示例#18
0
 def test16(self):
     """第一条数据的第一个流程流程转办(给测试人员)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "第一条数据的第一个流程流程转办(给测试人员)")
     yamlvalue['data'][0]['taskId'] = getattr(result, 'taskId_first')
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
 def test15(self):
     """查看模块列表(tree)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_manage.yaml", "查看模块列表(tree)")
     r = a.request(csurl, method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#20
0
 def test006_targetField_screen_mapping(self):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('mapping.yaml', func_name)
     data= {"pageIndex":1,"pageSize":10,"sourceModuleId":"756585727382392832","sourceFieldId":"756585730700087298"}
     a = RestClient(rooturl)
     res = a.request(url=csurl, method=method, json=data, headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
     check_datas(res, yamlvalue)
 def test010_screen_status_active(self):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('process_manage.yaml', func_name)
     a = RestClient(rooturl)
     res = a.request(url=csurl, method=method, headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
     pytest.assume('approval_flow' in res.text)
     pytest.assume('work_flow' in res.text)
示例#22
0
 def test03(self):
     """数据列表分页查询(100页)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "数据列表分页查询(100页)")
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#23
0
 def test06(self, insert_module_data):
     """第一条数据流程id查询"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "第一条数据流程id查询")
     r = a.request(csurl + insert_module_data[0], method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
 def test20(self):
     """搜索角色"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "permission_manage.yaml", "搜索角色")
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#25
0
 def test08(self):
     """指定字段值触发条件修改(开票申请)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "assign-field-values.yaml", "指定字段值触发条件修改(开票申请)")
     r = a.request(csurl, method, json=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
 def test002_create_work_flow(self):
     func_name = sys._getframe().f_code.co_name
     csurl, method, headers, yamlvalue, yaml_path, mainkey = get_common_params('process_manage.yaml', func_name)
     data={"procDef":{"procDefId":None,"bpmnXml":"<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:flowable=\"http://flowable.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.flowable.org/processdef\"><process id=\"flowable-1601172398382\" name=\"work_flow\" isExecutable=\"true\"><extensionElements/><startEvent id=\"node-start\" name=\"开始\" flowable:initiator=\"starter\"></startEvent><endEvent id=\"node-end\" name=\"结束\"></endEvent><userTask id=\"input-9f2f8cd8\" name=\"node\" flowable:formKey=\"756585727382392834\" flowable:candidateGroups=\"r_756585370497454081\"><extensionElements></extensionElements></userTask><sequenceFlow id=\"line-f9aacee4\" sourceRef=\"node-start\" targetRef=\"input-9f2f8cd8\"></sequenceFlow><sequenceFlow id=\"line-9ca1f0f1\" sourceRef=\"input-9f2f8cd8\" targetRef=\"node-end\"></sequenceFlow></process><bpmndi:BPMNDiagram id=\"BPMNDiagram_flowable-1601172398382\"><bpmndi:BPMNPlane bpmnElement=\"flowable-1601172398382\" id=\"BPMNPlane_flowable-1601172398382\"><bpmndi:BPMNShape bpmnElement=\"input-9f2f8cd8\" id=\"BPMNShape_input-9f2f8cd8\"><omgdc:Bounds height=\"35\" width=\"60\" x=\"216.015625\" y=\"75\"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement=\"node-start\" id=\"BPMNShape_node-start\"><omgdc:Bounds height=\"50\" width=\"50\" x=\"50\" y=\"50\"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement=\"node-end\" id=\"BPMNShape_node-end\"><omgdc:Bounds height=\"50\" width=\"50\" x=\"650\" y=\"480\"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement=\"line-f9aacee4\" id=\"BPMNEdge_line-f9aacee4\"><omgdi:waypoint x=\"0\" y=\"0\"></omgdi:waypoint><omgdi:waypoint x=\"0\" y=\"0\"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement=\"line-9ca1f0f1\" id=\"BPMNEdge_line-9ca1f0f1\"><omgdi:waypoint x=\"0\" y=\"0\"></omgdi:waypoint><omgdi:waypoint x=\"0\" y=\"0\"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></definitions>","formId":"756585727382392834","name":"work_flow","ruleCyclePeriod":"","ruleCycleTime":"undefined undefined  * * ?","ruleType":0,"status":0,"type":1,"pushFlag":0},"procNodes":[{"isBack":0,"assignee":"756585370497454081","assigneeType":5,"formId":"756585727382392834","name":"node","formLayoutCode":"edit","pushMsg":0,"taskDefKey":"input-9f2f8cd8","id":"","sequence":0}],"procMsg":{"assignee":"","assigneeType":0}}
     a = RestClient(rooturl)
     res = a.request(url=csurl, method=method, json=data, headers=headers)
     check_codes_msg(res, yamlvalue, mainkey)
     check_datas(res, yamlvalue)
示例#27
0
 def test04(self):
     """导航菜单外-自定义菜单展示(关联模块,范围全部)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "navigation_menu.yaml", "导航菜单外-自定义菜单展示(关联模块,范围全部)")
     r = a.request(csurl, method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#28
0
 def test04(self):
     """再次查询关联模块(客户模块 -- 测试用户)"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "association.yaml", "再次查询关联模块(客户模块 -- 测试用户)")
     r = a.request(csurl, method, params=yamlvalue['data'], headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
示例#29
0
 def test07(self):
     """表单查看布局查询"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "module_data_details.yaml", "表单查看布局查询")
     r = a.request(csurl, method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)
 def test28(self):
     """删除测试部门"""
     csurl, method, head, yamlvalue, yaml_path, mainkey = get_common_params(
         "permission_manage.yaml", "删除测试部门")
     r = a.request(csurl + getattr(result, 'dept_id'), method, headers=head)
     # convert_json_to_yaml(r.text, yaml_path, mainkey)
     check_codes_msg(r, yamlvalue, mainkey)
     check_datas(r, yamlvalue)