def test_007_role_getDetail(self): """ Time :2019-06-18 author : 罗林 desc :获取角色 """ rs1 = FinanceAction.test_role_getDetail(role_id) Assertion.verity(json.loads(rs1)['code'], 'F2000') Assertion.verity(json.loads(rs1)['message'], '请求成功') Assertion.verity(json.loads(rs1)['data']['count'], FinanceSql.get_role_count(role_id)) Assertion.verity(json.loads(rs1)['data']['id'], role_id) Assertion.verity(json.loads(rs1)['data']['name'], role_name) Assertion.verity(json.loads(rs1)['data']['orgCode'], org_code)
def test_010_role_getRoles_thr(self): """ Time :2019-06-18 author : 罗林 desc :获取角色列表 """ rs1 = FinanceAction.test_role_getRoles(pagenum=1, pagesize=10) Assertion.verity(json.loads(rs1)['code'], 'F2000') Assertion.verity(json.loads(rs1)['message'], '请求成功') Assertion.verity(json.loads(rs1)['data']['pageNum'], 1) Assertion.verity(json.loads(rs1)['data']['pageSize'], 10) Assertion.verityContain(json.loads(rs1)['data'], 'total') Assertion.verityContain(json.loads(rs1)['data'], 'totalPage') Assertion.verityContain(json.loads(rs1)['data'], 'record') Assertion.verityContain(json.loads(rs1)['data']['record'], 'id') Assertion.verityContain(json.loads(rs1)['data']['record'], 'orgCode') Assertion.verityContain(json.loads(rs1)['data']['record'], 'remark') Assertion.verityContain(json.loads(rs1)['data']['record'], 'count') Assertion.verityContain(json.loads(rs1)['data']['record'], role_name) Assertion.verityNotContain(json.loads(rs1)['data']['record'], del_role_name) for record in json.loads(rs1)['data']['record']: Assertion.verityContain(record['count'], str(FinanceSql.get_role_count(record['id'])))