Exemple #1
0
 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'], '获取失信人数据成功')
Exemple #2
0
 def test_008_api_execute_searchnocap_token_none(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错误')
Exemple #3
0
 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不能为空')
Exemple #4
0
 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'], '获取失信人数据成功')
Exemple #5
0
 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')