def test_018_api_court_searchnocap_token_none(self): """ desc : 获取被执行人数据 token空 author : 罗林 """ rs1 = DishonestexecutorAction.test_api_court_searchnocap( cardnum=cardnum, name=name, token=token + '1') Assertion.verity(json.loads(rs1)['code'], 10501) Assertion.verity(json.loads(rs1)['msg'], 'token错误')
def test_005_api_execute_searchnocap_19cardnum(self): """ desc : 获取失信人数据 19位数cardnum author : 罗林 """ rs1 = DishonestexecutorAction.test_api_execute_searchnocap( cardnum=fake.random_number(19), name='', token=token) Assertion.verity(json.loads(rs1)['code'], 10200) Assertion.verity(json.loads(rs1)['msg'], '获取失信人数据成功')
def test_014_api_court_searchnocap_17cardnum(self): """ desc : 获取被执行人数据 17位数cardnum author : 罗林 """ rs1 = DishonestexecutorAction.test_api_court_searchnocap( cardnum=fake.random_number(17), name='', token=token) Assertion.verity(json.loads(rs1)['code'], 10200) Assertion.verity(json.loads(rs1)['msg'], '获取被执行人数据成功')
def test_007_api_execute_searchnocap_token_error(self): """ desc : 获取失信人数据 token错误 author : 罗林 """ rs1 = DishonestexecutorAction.test_api_execute_searchnocap( cardnum=cardnum, name=name, token=token + '1') Assertion.verity(json.loads(rs1)['code'], 10501) Assertion.verity(json.loads(rs1)['msg'], 'token错误')
def test_006_api_execute_searchnocap_cardnum_none(self): """ desc : 获取失信人数据 cardnum空 author : 罗林 """ rs1 = DishonestexecutorAction.test_api_execute_searchnocap(cardnum='', name=name, token=token) Assertion.verity(json.loads(rs1)['code'], 10400) Assertion.verity(json.loads(rs1)['msg'], 'cardnum不能为空')
def test_003_api_execute_searchnocap_name_none(self): """ desc : 获取失信人数据name为空 author : 罗林 """ rs1 = DishonestexecutorAction.test_api_execute_searchnocap( cardnum=cardnum, name='', token=token) if json.loads(rs1)['code'] == 10300: Assertion.verity(json.loads(rs1)['msg'], '验证码错误或验证码已过期,请重试!') elif json.loads(rs1)['code'] == 10200: Assertion.verity(json.loads(rs1)['msg'], '获取失信人数据成功')
def test_012_api_court_searchnocap_thr(self): """ desc : 获取被执行人数据 再次调取 author : 罗林 """ rs1 = DishonestexecutorAction.test_api_court_searchnocap( cardnum=cardnum_thr, name=name_thr, token=token) if json.loads(rs1)['code'] == 10300: Assertion.verity(json.loads(rs1)['msg'], '验证码错误或验证码已过期,请重试!') elif json.loads(rs1)['code'] == 10200: Assertion.verity(json.loads(rs1)['msg'], '获取被执行人数据成功')
def test_002_api_execute_searchnocap_two(self): """ desc : 获取失信人数据再次调用 author : 罗林 """ rs1 = DishonestexecutorAction.test_api_execute_searchnocap( cardnum=cardnum_two, name=name_two, token=token) if json.loads(rs1)['code'] == 10300: Assertion.verity(json.loads(rs1)['msg'], '验证码错误或验证码已过期,请重试!') elif json.loads(rs1)['code'] == 10200: Assertion.verity(json.loads(rs1)['msg'], '获取失信人数据成功') Assertion.verity(json.loads(rs1)['data']['data'][0]['age'], '44') Assertion.verity( json.loads(rs1)['data']['data'][0]['areaName'], '河北') Assertion.verity( json.loads(rs1)['data']['data'][0]['courtName'], '唐山市中级人民法院') Assertion.verity(json.loads(rs1)['data']['data'][0]['age'], '44')