Beispiel #1
0
	def test_04_manage_fallback(self):
		"""高级审批经理回退到申请录入"""
		self.case_name = custom.get_current_function_name()
		try:
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			# 1. 申请录入
			self.before_application_entry()
			# 2. 审批
			user_list = ['分公司主管', '分公司经理', '区域经理']
			for i in user_list:
				# 下一个处理人重新登录
				page = Login(self.next_user_id)
				res = self.PT.approval_to_review(page, self.apply_code, i, 0)
				self.risk_approval_result(res, i, page, self.apply_code)
			
			if self.next_user_id != self.senior_manager:
				return
			
			# 3. 回退
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 审批经理回退
			res = self.PT.approval_to_review(page, self.apply_code, u'审批经理回退到申请录入成功', 1)
			if not res:
				self.run_result = False
				self.log.error("审批经理回退失败!")
				raise AssertionError('审批经理回退失败!')
			else:
				self.log.info(u'审批经理回退到申请录入成功!')
				self.get_next_user(page, self.apply_code)
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #2
0
	def test_04_manage_cancel(self):
		"""审批经理取消"""
		self.case_name = custom.get_current_function_name()
		try:
			# 1. 进件
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			self.before_application_entry()
			# 2. 审批
			user_list = ['分公司主管', '分公司经理', '区域经理']
			for i in user_list:
				# 下一个处理人重新登录
				page = Login(self.next_user_id)
				res = self.PT.approval_to_review(page, self.apply_code, i, 0)
				self.risk_approval_result(res, i, page, self.apply_code)
			
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 审批经理取消
			res = self.PT.approval_to_review(page, self.apply_code, u'审审批经理取消成功', 2)
			if not res:
				self.run_result = False
				self.log.error("高级审批经理取消失败!")
				raise AssertionError('高级审批经理取消失败')
			else:
				self.log.info(u'高级审批经理取消成功!')
				self.get_next_user(page, self.apply_code)
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #3
0
	def test_03_regional_fallback(self):
		"""区域复核回退到申请录入"""
		self.case_name = custom.get_current_function_name()
		try:
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			self.before_application_entry()
			# ----------- 审批--------------
			user_list = ['分公司主管', '分公司经理']
			for i in user_list:
				# 下一个处理人重新登录
				page = Login(self.next_user_id)
				res = self.PT.approval_to_review(page, self.apply_code, i, 0)
				self.risk_approval_result(res, i, page, self.apply_code)
			
			# ----------回退-----------
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 区域预复核回退
			res = self.PT.approval_to_review(page, self.apply_code, u'区域回退到申请录入', 1)
			if not res:
				self.run_result = False
				self.log.error("回退失败")
				raise ValueError("回退失败")
			else:
				self.log.info(u'区域回退到申请录入成功!')
				self.get_next_user(page, self.apply_code)
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #4
0
	def test_03_regional_reject(self):
		"""区域复核拒绝"""
		self.case_name = custom.get_current_function_name()
		try:
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			self.before_application_entry()
			
			# 2. 审批
			user_list = ['分公司主管', '分公司经理']
			for i in user_list:
				# 下一个处理人重新登录
				page = Login(self.next_user_id)
				res = self.PT.approval_to_review(page, self.apply_code, i, 0)
				self.risk_approval_result(res, i, page, self.apply_code)
			
			# 3. 拒绝
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 区域预复核拒绝
			res = self.PT.approval_to_review(page, self.apply_code, u'区域拒绝', 3)
			if not res:
				self.run_result = False
				self.log.error("区域拒绝失败")
				raise AssertionError('区域拒绝失败')
			else:
				self.log.info("区域拒绝!")
				self.get_next_user(page, self.apply_code)
			
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			res = self.PT.approval_to_review(page, self.apply_code, u'高级经理拒绝', 3)
			if not res:
				self.run_result = False
				self.log.error("高级经理拒绝失败")
				raise AssertionError('高级经理拒绝失败')
			else:
				self.log.info("高级经理拒绝拒绝成功!")
				page.driver.quit()
			
			# 高级审批经理登录
			page = Login(self.senior_manager)
			
			# 拒绝
			value = self.HRL.reconsideration(page, self.apply_code)
			if value:
				self.log.info(u'区域拒绝成功,拒绝单已处于拒绝队列!')
				page.driver.quit()
			else:
				self.run_result = False
				self.log.error(u'区域失败,拒绝队列未找到该笔单!')
				raise AssertionError('区域失败,拒绝队列未找到该笔单!')
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #5
0
	def test_04_manage_reject_pass(self):
		"""高级审批经理拒绝,并复议通过"""
		
		self.case_name = custom.get_current_function_name()
		try:
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			self.before_application_entry()
			"""
				------------------------------------------------------------
									2. 风控审批回退
				------------------------------------------------------------
			"""
			
			# 2. 审批
			user_list = ['分公司主管', '分公司经理', '区域经理']
			for i in user_list:
				# 下一个处理人重新登录
				page = Login(self.next_user_id)
				res = self.PT.approval_to_review(page, self.apply_code, i, 0)
				self.risk_approval_result(res, i, page, self.apply_code)
			
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 高级经理拒绝
			res = self.PT.approval_to_review(page, self.apply_code, u'高级经理拒绝', 3)
			if not res:
				self.run_result = False
				self.log.error("高级经理拒绝失败!")
				raise AssertionError('高级经理拒绝失败!')
			else:
				self.log.info(u'高级经理拒绝成功!')
				page.driver.quit()
			
			# 高级审批经理登录
			page = Login(self.senior_manager)
			
			# 复议通过
			r1 = self.HRL.reconsideration(page, self.apply_code, 1)
			if r1:
				self.log.info(u'复议通过!')
				page.driver.quit()
			else:
				self.run_result = False
				self.log.error(u'复议出错!')
				raise AssertionError('复议出错!')
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #6
0
    def test_cwd_11_manager_approval(self):
        """高级审批经理审批"""

        # 获取审批经理ID
        self.test_cwd_10_regional_prereview()
        self.case_name = custom.get_current_function_name()
        if self.next_user_id != self.senior_manager:
            return
        else:
            # 下一个处理人重新登录
            page = Login(self.next_user_id)

            # 审批审核
            res = self.PT.approval_to_review(page, self.apply_code, u'审批经理审批')
            if not res:
                self.run_result = False
                self.log.ERROR("can't find applycode")
                raise ValueError("can't find applycode")
            else:
                self.log.info("风控审批-审批经理审批结束")

            # 查看下一步处理人
            res = self.PM.process_monitor(page, self.apply_code)
            if not res:
                self.run_result = False
                self.log.error("Can't found next user!")
            else:
                self.next_user_id = res
                self.log.info("下一个处理人:" + self.next_user_id)
                # 当前用户退出系统
                self.page.driver.quit()
Beispiel #7
0
    def test_cwd_10_regional_prereview(self):
        """区域预复核审批"""

        # 获取区域预复核员ID
        self.test_cwd_09_branch_manager_approval()
        self.case_name = custom.get_current_function_name()
        # 下一个处理人重新登录
        page = Login(self.next_user_id)

        # 审批审核
        res = self.PT.approval_to_review(page, self.apply_code, u'区域预复核通过')
        if not res:
            self.run_result = False
            self.log.error("can't find applycode")
            raise ValueError("can't find applycode")
        else:
            self.log.info("区域预复核审批结束")

        # 查看下一步处理人
        res = self.PM.process_monitor(page, self.apply_code)
        if not res:
            self.run_result = False
            self.log.error("Can't found next user!")
            raise ValueError("没有找到下一个处理人")
        else:
            self.next_user_id = res
            self.log.info("下一步处理人:" + self.next_user_id)
            # 当前用户退出系统
            page.driver.quit()
Beispiel #8
0
    def test_10_part_authority_card_second_deal(self):
        """第二次权证办理"""
        self.test_09_part_funds_raise()
        self.case_name = custom.get_current_function_name()
        page = Login(self.company["authority_member"]["user"])

        # 修改数据库,将第一次请款修改为放款成功,然后才能发起第二次权证请款,否则第二次权证办理不能跟提交
        db = database.DB()

        sql_1 = "UPDATE house_common_loan_info t SET t.pay_date=sysdate, t.status='LOAN_PASS' \
		WHERE t.apply_id= (SELECT t.apply_id FROM house_apply_info t \
		WHERE t.apply_code =" + "'" + self.apply_code + "'" + ")"

        contract_no = self.apply_code + '-3-02-1'

        sql_2 = "UPDATE house_funds_info t SET t.Funds_Status = 21  \
		WHERE t.apply_id = (SELECT t.apply_id FROM house_apply_info t \
		WHERE t.apply_code = " + "'" + self.apply_code + "'" + ")" + "AND CONTRACT_NO =" + "'" + contract_no + "'"

        db.sql_execute(sql_1)
        db.sql_execute(sql_2)
        db.sql_commit()
        time.sleep(3)

        # 权证员上传权证信息
        res = self.WM.authority_card_transact_2(page, self.apply_code, 2,
                                                self.env)
        if not res:
            self.log.error("上传权证资料失败")
            raise ValueError("上传权证资料失败")
        else:
            self.log.info("权证办理完成")
            self.next_user_id = common.get_next_user(page, self.apply_code)
Beispiel #9
0
 def test_for_public_recognise(self):
     page = Login('xn071385')
     page.driver.find_element_by_id(
         '1DF1A2778FE0000148CBDE1D1A006F00').click()
     page.driver.find_element_by_xpath(
         '//*[@id="1DF1A2778FE0000148CBDE1D1A006F00"]/ul/li[1]').click()
     name = '红色法拉利'
     page.driver.switch_to.frame('bTabs_tab_house_commonIndex_wait_index')
     page.driver.find_element_by_name('factRepayName').click()
     page.driver.find_element_by_name('factRepayName').send_keys(name)
     money = '5000'
     page.driver.find_element_by_name('receiptAmount').send_keys(money)
     page.driver.find_element_by_name('receiptDateStart').send_keys(
         '2018-05-29')
     page.driver.find_element_by_xpath(
         '/html/body/div[1]/div[1]/div[2]/a[1]').click()
     page.driver.find_element_by_xpath(
         '/html/body/div[1]/div[1]/div[2]/a[1]').click()
     page.driver.find_element_by_xpath(
         '//*[@id="table_box"]/div/div/div[1]/div[2]/div[2]').click()
     res = page.driver.find_element_by_xpath(
         '//*[@id="datagrid-row-r2-2-0"]/td[6]/div')
     print(res.text)
     page.driver.find_element_by_xpath(
         '//*[@id="datagrid-row-r2-2-0"]/td[18]/div/button').click()
     # page.driver.find_element_by_xpath('//*[@id="contractNo"]').click()
     # page.driver.find_element_by_xpath('//*[@id="contractNo"]').send_keys('assss')
     page.driver.find_element_by_xpath(
         '//*[@id="admitsModal"]/div/div/div[3]/button[2]').click()
     page.driver.find_element_by_xpath(
         '//*[@id="admitsMoneyAllotModal"]/div/div/div[3]/button[2]').click(
         )
    def test_random_product_06_show_task(self):
        """查看待处理任务列表"""

        try:
            self.test_random_product_05_get_applyCode()
            self.case_name = custom.get_current_function_name()
            next_id = self.PM.process_monitor(self.page, self.apply_code)
            if next_id:
                self.log.info("下一个处理人:" + next_id)
                self.next_user_id = next_id
            else:
                raise ValueError("没有找到下一个处理人!")
            self.page.driver.quit()

            page = Login(self.next_user_id)

            res = self.PT.query_task(page, self.apply_code)
            if res:
                self.log.info("待处理任务列表中存在该笔案件!")
            else:
                self.log.error("待处理任务列表中不存在该笔案件!")
                raise ValueError("查询失败")
        except Exception as e:
            self.run_result = False
            raise e
Beispiel #11
0
	def test_gqt_16_finace_transact(self):
		"""财务办理"""
		
		try:
			# 权证请款
			self.test_gqt_15_warrant_apply()
			self.case_name = custom.get_current_function_name()
			# 业务助理登录
			page = Login(self.company["business_assistant"]["user"])
			result = self.FA.finace_transact(page, self.apply_code)
			if result:
				self.log.info("完成财务办理")
			
			# 查看下一步处理人
			res = self.PM.process_monitor(page, self.apply_code, 1)
			if not res:
				self.run_result = False
				raise ValueError('查询下一步处理人出错!')
			else:
				self.next_user_id = res
				# 当前用户退出系统
				page.driver.quit()
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #12
0
	def test_gqt_14_authority_card_member_transact(self):
		"""权证办理"""
		
		try:
			# 合规审查
			self.test_gqt_13_compliance_audit()
			self.case_name = custom.get_current_function_name()
			# 权证员登录
			page = Login(self.company["authority_member"]["user"])
			# 权证员上传权证信息
			self.WM.authority_card_transact(page, self.apply_code, self.env)
			# 查看下一步处理人
			res = self.PM.process_monitor(page, self.apply_code)
			if not res:
				self.run_result = False
				self.log.error("上传权证资料失败")
				raise AssertionError('上传权证资料失败')
			else:
				self.log.info("权证办理完成")
				self.next_user_id = res
				# 当前用户退出系统
				page.driver.quit()
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #13
0
	def test_gqt_08_branch_supervisor_approval(self):
		"""分公司主管审批"""
		
		self.test_gqt_07_process_monitor()
		self.case_name = custom.get_current_function_name()
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 审批审核
		res = self.PT.approval_to_review(page, self.apply_code, u'分公司主管同意审批')
		if not res:
			self.run_result = False
			self.log.error("can't find applycode")
			raise ValueError("can't find applycode")
		
		# 查看下一步处理人
		next_id = self.PM.process_monitor(page, self.apply_code)
		if not res:
			self.run_result = False
			self.log.error("流程监控查询失败")
			raise AssertionError('流程监控查询失败')
		else:
			self.next_user_id = next_id
			self.log.info("风控审批-分公司主管审批结束")
			self.log.info("下一个处理人:" + self.next_user_id)
			page.driver.quit()
    def test_random_product_22_base_data_push(self):
        """基础数据推送数据"""
        try:
            self.test_random_product_21_funds_raise()
        except Exception as e:
            self.log.error("募资错误")
            raise e

        # self.apply_code = 'NT20180529E08'

        # 修改放款
        sql_1 = "UPDATE house_common_loan_info t SET t.pay_date=sysdate, t.status='LOAN_PASS' \
				WHERE t.apply_id= (SELECT t.apply_id FROM house_apply_info t \
				WHERE t.apply_code =" + "'" + self.apply_code + "'" + ")"

        sql_2 = "UPDATE house_funds_info t SET t.Funds_Status = 21  \
				WHERE t.apply_id = (SELECT t.apply_id FROM house_apply_info t \
				WHERE t.apply_code = " + "'" + self.apply_code + "'" + ")"

        # 修改合同签约表
        sql_3 = "UPDATE HOUSE_CONTRACT_SIGN SET STATUS = 'PASS' " \
                " WHERE APPLY_ID = (SELECT t.apply_id FROM house_apply_info t \
				WHERE t.apply_code ="                                + "'" + self.apply_code + "')"

        db = database.DB()
        db.sql_execute(sql_1)
        db.sql_execute(sql_2)
        db.sql_execute(sql_3)
        db.sql_commit()
        time.sleep(3)

        # 基础数据同步
        page = Login(self.treasurer)
        self.BaseData.push_data_to_financial(page, self.apply_code)
        page.driver.quit()
 def test_random_product_11_manager_approval(self):
     """高级审批经理审批"""
     try:
         # 获取审批经理ID
         self.test_random_product_10_regional_prereview()
         self.case_name = custom.get_current_function_name()
         if self.next_user_id != self.senior_manager:
             return
         else:
             # 下一个处理人重新登录
             page = Login(self.next_user_id)
             # 审批审核
             self.PT.approval_to_review(page, self.apply_code, u'高级审批经理审批')
             # 查看下一步处理人
             res = self.PM.process_monitor(page, self.apply_code)
             if not res:
                 raise AssertionError('没有找到下一个处理人')
             else:
                 self.next_user_id = res
                 self.log.info("下一个处理人:" + res)
                 # 当前用户退出系统
                 page.driver.quit()
     except Exception as e:
         self.run_result = False
         raise e
    def test_random_product_10_regional_prereview(self):
        """区域预复核审批"""
        try:
            # 获取区域预复核员ID
            self.test_random_product_09_branch_manager_approval()
            self.case_name = custom.get_current_function_name()
            # 下一个处理人重新登录
            page = Login(self.next_user_id)

            # 审批审核
            res = self.PT.approval_to_review(page, self.apply_code, u'区域预复核通过')
            if not res:
                self.log.error("区域预复核失败")
                raise AssertionError("区域预复核失败")
            else:
                self.log.info("区域预复核审批完成!")

            # 查看下一步处理人
            res = self.PM.process_monitor(page, self.apply_code)
            if not res:
                self.log.error("Can't not found the next UserId")
                raise AssertionError("Can't not found the next UserId")
            else:
                self.next_user_id = res
                self.log.info("next_user_id %s", self.next_user_id)
                # 当前用户退出系统
                page.driver.quit()
        except Exception as e:
            self.run_result = False
            raise e
    def test_random_product_09_branch_manager_approval(self):
        """分公司经理审批"""

        try:
            # 获取分公司经理登录ID
            self.test_random_product_08_branch_supervisor_approval()
            self.case_name = custom.get_current_function_name()
            # 下一个处理人重新登录
            page = Login(self.next_user_id)

            # 审批审核
            self.PT.approval_to_review(page, self.apply_code, u'分公司经理同意审批')

            # 查看下一步处理人
            res = self.PM.process_monitor(page, self.apply_code)
            if not res:
                raise AssertionError("没有找到下一个处理人")
            else:
                self.next_user_id = res
                self.log.info("下一个处理人: " + self.next_user_id)
                # 当前用户退出系统
                page.driver.quit()
        except Exception as e:
            self.run_result = False
            raise e
Beispiel #18
0
    def test_cwd_17_finace_approval_branch_manager(self):
        """财务分公司经理审批"""

        remark = u"财务分公司经理审批"

        # 下一个处理人
        self.test_cwd_16_finace_transact()
        self.case_name = custom.get_current_function_name()
        page = Login(self.next_user_id)
        result = self.FA.finace_approval(page, self.apply_code, remark)

        if not result:
            self.run_result = False
            raise result
        else:
            self.log.info("财务流程-分公司经理审批结束")
            # 查看下一步处理人
            res = self.PM.process_monitor(page, self.apply_code, 1)
            if not res:
                self.run_result = False
                raise ValueError("Can't found Next User!")
            else:
                self.next_user_id = res
                self.log.info("Next deal User:" + self.next_user_id)
                # 当前用户退出系统
                page.driver.quit()
Beispiel #19
0
    def test_cwd_18_finace_approval_risk_control_manager(self):
        """财务风控经理审批"""

        remark = u'风控经理审批'

        self.test_cwd_17_finace_approval_branch_manager()
        self.case_name = custom.get_current_function_name()
        page = Login(self.next_user_id)
        rs = self.FA.finace_approval(page, self.apply_code, remark)
        if rs:
            self.log.info("财务流程-风控经理审批结束")
        else:
            self.run_result = False
            raise ValueError("风控经理审批出错!")

        # 查看下一步处理人
        res = self.PM.process_monitor(page, self.apply_code, 1)
        if not res:
            self.run_result = False
            raise ValueError("can't found Next User!")
        else:
            self.next_user_id = res
            self.log.info("nextId:" + self.next_user_id)
            # 当前用户退出系统
            page.driver.quit()
Beispiel #20
0
	def test_01_branch_director_cancel(self):
		"""主管取消"""
		self.case_name = custom.get_current_function_name()
		try:
			"""
				1. 申请基本信息录入
			"""
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			self.before_application_entry()
			"""
				2. 风控取消
			"""
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 分公司主管取消
			res = self.PT.approval_to_review(page, self.apply_code, u'主管取消', 2)
			if not res:
				self.run_result = False
				self.log.error("分公司主管取消失败")
				raise AssertionError('分公司主管取消失败')
			else:
				self.log.info(u'主管取消!')
				self.get_next_user(page, self.apply_code)
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #21
0
    def test_xhd_08_branch_supervisor_approval(self):
        """分公司主管审批"""

        try:
            # 获取分公司登录ID
            self.test_xhd_07_process_monitor()
            self.case_name = custom.get_current_function_name()
            # 下一个处理人重新登录
            page = Login(self.next_user_id)

            # 审批审核
            self.PT.approval_to_review(page, self.apply_code, u'分公司主管同意审批')

            # 查看下一步处理人
            next_id = self.PM.process_monitor(page, self.apply_code)
            if not next_id:
                self.run_result = False
                self.log.error("Can't Get Next User")
                raise AssertionError("get Next user error!")
            else:
                self.next_user_id = next_id
                self.log.info("Next Deal User: " + self.next_user_id)
                # 当前用户退出系统
                self.page.driver.quit()
        except Exception as e:
            self.run_result = False
            raise e
Beispiel #22
0
class BaseTestCase(unittest.TestCase):
    excel_path = ReadConfig.get_file_name("file_name")

    @classmethod
    def setUpClass(self):
        # 初始化
        self.reponse = None
        self.check = CheckPoint()
        self.opera = OperationExcel(self.excel_path, 0)
        self.getdata = GetDataFromExcel(self.excel_path, 0)
        self.data_list = self.opera.data
        self.login = Login(self.excel_path, 0)
        self.get_md5 = GetMD5()
        # 调用登录方法
        Logger().info("开始调用公共的登录方法")
        self.response = self.login.login()
        self.uid = self.response.get("data").get("uid")
        self.key = self.response.get("data").get("key")
        self.gettime = self.get_md5.get_time()
        self.sign = self.get_md5.get_sign(self.uid + self.gettime)
        Logger().info("【登录成功后,获取到的uid为:{},获取到的key为:{}.】".format(
            self.uid, self.key))

    @classmethod
    def tearDownClass(self):
        pass
Beispiel #23
0
    def test_xhd_11_manager_approval(self):
        """高级审批经理审批"""

        try:
            # 获取审批经理ID
            self.test_xhd_10_regional_prereview()
            self.case_name = custom.get_current_function_name()
            if self.next_user_id != self.senior_manager:
                return
            else:
                # 下一个处理人重新登录
                page = Login(self.next_user_id)

                # 审批审核
                result = self.PT.approval_to_review(page, self.apply_code,
                                                    u'高级审批经理审批')
                if not result:
                    self.run_result = False
                    self.log.error("风控-高级审批经理审批失败")
                    raise AssertionError('风控-高级审批经理审批失败')
                else:
                    self.log.info("风控-高级审批经理审批完成")

                # 查看下一步处理人
                self.next_user_id = common.get_next_user(page, self.apply_code)
        except Exception as e:
            self.run_result = False
            raise e
Beispiel #24
0
    def test_xhd_12_contract_signing(self):
        """签约"""

        rec_bank_info = dict(
            recBankNum=self.data['houseCommonLoanInfoList'][0]['recBankNum'],
            recPhone=self.data['houseCommonLoanInfoList'][0]['recPhone'],
            recBankProvince=self.data['houseCommonLoanInfoList'][0]
            ['recBankProvince'],
            recBankDistrict=self.data['houseCommonLoanInfoList'][0]
            ['recBankDistrict'],
            recBank=self.data['houseCommonLoanInfoList'][0]['recBank'],
            recBankBranch=self.data['houseCommonLoanInfoList'][0]
            ['recBankBranch'],
        )

        # 获取合同打印专员ID
        self.test_xhd_11_manager_approval()
        self.case_name = custom.get_current_function_name()
        # 下一个处理人重新登录
        page = Login(self.next_user_id)

        # 签约
        rc = Cts.ContractSign(page, self.apply_code, rec_bank_info)
        rs = rc.execute_enter_borroers_bank_info()
        if not rs:
            self.run_result = False
            self.log.error("签约失败")
            raise AssertionError('签约失败')
        else:
            rc.contract_submit()
            self.log.info("签约成功")

        # 查看下一步处理人
        self.next_user_id = common.get_next_user(page, self.apply_code)
Beispiel #25
0
	def test_01_branch_director_fallback(self):
		"""主管回退到申请录入"""
		
		"""
			1. 申请基本信息录入
		"""
		self.case_name = custom.get_current_function_name()
		try:
			
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			self.before_application_entry()
			
			"""
				2. 风控回退
			"""
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 分公司主管回退
			res = self.PT.approval_to_review(page, self.apply_code, u'回退到申请录入', 1)
			if not res:
				self.run_result = False
				self.log.error("回退失败")
				raise ValueError("回退失败")
			else:
				self.log.info(u'分公司主管回退成功!')
				self.get_next_user(page, self.apply_code)
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #26
0
    def test_cwd_09_branch_manager_approval(self):
        """分公司经理审批"""

        # 获取分公司经理登录ID
        self.test_cwd_08_branch_supervisor_approval()
        self.case_name = custom.get_current_function_name()
        # 下一个处理人重新登录
        page = Login(self.next_user_id)

        # 审批审核
        res = self.PT.approval_to_review(page, self.apply_code, u'分公司经理同意审批')
        if not res:
            self.run_result = False
            raise ValueError("can't find applycode")
        else:
            self.log.info("风控审批-分公司经理审批结束")

        # 查看下一步处理人
        res = self.PM.process_monitor(page, self.apply_code)
        if not res:
            self.run_result = False
            raise ValueError("查询下一步处理人出错!")
        else:
            self.next_user_id = res
            self.log.info("下一个处理人:" + self.next_user_id)
            # 当前用户退出系统
            page.driver.quit()
Beispiel #27
0
 def setUpClass(self):
     # 初始化
     self.reponse = None
     self.check = CheckPoint()
     self.opera = OperationExcel(self.excel_path, 0)
     self.getdata = GetDataFromExcel(self.excel_path, 0)
     self.data_list = self.opera.data
     self.login = Login(self.excel_path, 0)
     self.get_md5 = GetMD5()
     # 调用登录方法
     Logger().info("开始调用公共的登录方法")
     self.response = self.login.login()
     self.uid = self.response.get("data").get("uid")
     self.key = self.response.get("data").get("key")
     self.gettime = self.get_md5.get_time()
     self.sign = self.get_md5.get_sign(self.uid + self.gettime)
     Logger().info("【登录成功后,获取到的uid为:{},获取到的key为:{}.】".format(
         self.uid, self.key))
Beispiel #28
0
	def test_01_branch_director_reject_fail(self):
		"""主管拒绝,并复议不通过"""
		self.case_name = custom.get_current_function_name()
		try:
			"""
				1. 申请基本信息录入
			"""
			custom.print_product_info(self.product_info)
			custom.print_person_info(self.person_info)
			
			self.before_application_entry()
			"""
				2. 风控拒绝
			"""
			# 下一个处理人重新登录
			page = Login(self.next_user_id)
			
			# 分公司主管回退
			res = self.PT.approval_to_review(page, self.apply_code, u'主管拒绝', 3)
			if not res:
				self.run_result = False
				self.log.error("主管拒绝失败")
				raise AssertionError('主管拒绝失败,复议出错!')
			else:
				self.log.info(u'主管拒绝!')
				page.driver.quit()
			
			# 高级审批经理登录
			page = Login(self.senior_manager)
			
			# 复议通过
			r1 = self.HRL.reconsideration(page, self.apply_code, 2)
			if r1:
				self.log.info(u'主管拒绝成功,复议不通过成功!')
				page.driver.quit()
			else:
				self.run_result = False
				self.log.error(u'主管拒绝失败,复议不通过出错!')
				raise AssertionError('主管拒绝失败,复议不通过出错!')
		except Exception as e:
			self.run_result = False
			raise e
Beispiel #29
0
 def test_03_receipt_first_approval(self):
     """第一次回执放款申请"""
     self.test_02_part_receipt_manage_approval()
     self.case_name = custom.get_current_function_name()
     page = Login(self.next_user_id)
     rec = self.PT.receipt_return(page, self.apply_code)
     if not rec:
         self.log.error("第一次回执放款申请失败")
         raise ValueError('失败')
     else:
         self.log.info("第一次回执放款申请通过")
         self.next_user_id = common.get_next_user(page, self.apply_code)
Beispiel #30
0
    def test_13_part_finace_branch_manage_aproval_second(self):
        """第二次财务分公司主管审批"""
        remark = u"财务分公司经理审批"

        self.test_12_part_finace_transact_second()
        self.case_name = custom.get_current_function_name()
        page = Login(self.next_user_id)
        result = self.FA.finace_approval(page, self.apply_code, remark)
        if not result:
            self.log.error("财务流程-分公司经理审批失败")
            raise AssertionError('财务流程-分公司经理审批失败')
        # 查看下一步处理人
        self.next_user_id = common.get_next_user(page, self.apply_code, 2)