Esempio n. 1
0
 def test_submit_risk_info_003(self):
     data = Setup(self.trade, self.case_id_003)
     data.put_task_action_setup()
     sesion = login.get_session(data.username, data.passwd)
     switch_position.switch_position(sesion, data.position)
     asset_item_id = asset_items.asset_items_add(
         sesion, data.asset_type, data.asset_phone, data.asset_account,
         data.asset_finace, data.asset_customer_name, data.asset_card,
         data.asset_sex)
     asset_items.asset_items_edit(sesion, asset_item_id, data.asset_type,
                                  data.asset_phone, data.asset_account,
                                  data.asset_finace,
                                  data.asset_customer_name, data.asset_card,
                                  data.asset_sex)
     if data.card_type == '0':
         r_json = submit_risk_info.task_submit_risk_info_company(
             sesion, asset_item_id, data.bank_phone,
             data.asset_customer_name, data.company_card,
             data.isEntrustedPayment, data.risk_level, data.company_account,
             data.purpose, data.card_type)
     else:
         r_json = submit_risk_info.task_submit_risk_info_personal(
             sesion, asset_item_id, data.bank_phone,
             data.asset_customer_name, data.asset_card,
             data.isEntrustedPayment, data.risk_level, data.asset_account,
             data.purpose)
     if r_json["success"] is True and r_json['message'] == "":
         data.set_return_info('返回资产编号', asset_item_id)
         data.set_result('执行成功', str(r_json))
     elif r_json["success"] is False and r_json['message'] != "":
         data.set_result('执行失败', str(r_json))
Esempio n. 2
0
 def test_login_004(self):
     data = Setup(self.trade, self.case_id_004)
     data.asset_login_setup()
     r_json = login.asset_login(data.username, data.passwd)
     if r_json["success"] is False and r_json['message'] == "登录服务错误":
         data.set_result('执行成功', str(r_json))
     elif r_json["success"] is True and r_json['message'] != "登录服务错误":
         data.set_result('执行失败', str(r_json))
Esempio n. 3
0
 def test_switch_position_007(self):
     data = Setup(self.trade, self.case_id_007)
     data.switch_position_setup()
     sesion = login.get_session(data.username, data.passwd)
     r_json = switch_position.switch_position(sesion, data.position)
     if r_json["success"] is True and r_json['message'] == "":
         data.set_result('执行成功', str(r_json))
     elif r_json["success"] is False and r_json['message'] != "":
         data.set_result('执行失败', str(r_json))
Esempio n. 4
0
 def test_asset_items_004(self):
     data = Setup(self.trade, self.case_id_004)
     data.asset_add_setup()
     sesion = login.get_session(data.username, data.passwd)
     switch_position.switch_position(sesion, data.position)
     asset_item_id = asset_items.asset_items_add(
         sesion, data.asset_type, data.asset_phone, data.asset_account,
         data.asset_finace, data.asset_customer_name, data.asset_card,
         data.asset_sex)
     r_json = asset_items.asset_items_edit(
         sesion, asset_item_id, data.asset_type, data.asset_phone,
         data.asset_account, data.asset_finace, data.asset_customer_name,
         data.asset_card, data.asset_sex)
     if r_json["success"] is True and r_json['message'] == "":
         data.set_return_info('返回资产编号', asset_item_id)
         data.set_result('执行成功', str(r_json))
     elif r_json["success"] is False and r_json['message'] != "":
         data.set_result('执行失败', str(r_json))