def setUp(self):
        self._init_params()
        self.page = Login()
        self.applyCode = ""
        self.log = Log()

        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_cwd.json"
            data, company = enviroment_change(filename, self.number, self.env)
            # 录入的源数据
            self.data = data
            # 分公司选择
            self.company = company
        except Exception as e:
            print('load config error:', str(e))
            raise
Beispiel #2
0
    def setUp(self):
        self.page = Login()
        self.applyCode = ''
        self.next_user_id = ""
        local_dir = os.getcwd()
        print("local_dir: %s " % local_dir)
        self.log = custom.Log()
        # 环境初始化
        # self._enviroment_change(0)
        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_cwd.json"
            data, company = custom.enviroment_change(filename, self.number,
                                                     self.env)
            # 录入的源数据
            self.data = data
            # 分公司选择
            self.company = company
        except Exception as e:
            print('load config error:', str(e))
            raise
Beispiel #3
0
    def setUp(self):
        self.page = Login()
        self.applyCode = ''
        self.next_user_id = ""
        self.cust_info = dict(
            _borrow_info=dict(
                custName=getName(),
                idNum="360101199101011054",
                phone="13564789215",
                address=u"湖南长沙",
                companyName=u'小牛普惠管理有限公司',
                postName=u'工程师',
                workDate=u'2011-02-03',  # 入职日期
                workYear=5,  # 工作年限
                monthIncoming=15000  # 月均收入
            ),
            _cust_base_info=dict(
                productName=u'过桥通-1.0(一线城市)',  # 贷款产品
                applyAmount=50000,  # 申请金额
                applyPeriod=10,  # 贷款天数
                branchManager=u"小明",
                branchManagerCode="xn111",
                teamGroup=u"A队",
                teamGroupCode="xn0001",
                teamManager=u"小王",
                teamManagerCode="xn0001",
                sale=u"王刚",
                saleCode="xn0002",
                monthIncome=3000,
                checkApprove=u"同意",
            ))

        self.loan_amount = 200000  # 拆分金额
        self.log = Log()

        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            # print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_gqt.json"
            data, company = enviroment_change(filename, self.number, self.env)
            # 录入的源数据
            self.data = data
            # 分公司选择
            self.company = company
        except Exception as e:
            print('load config error:', str(e))
            raise
Beispiel #4
0
    def setUp(self):
        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_cwd.json"
            data, company = custom.enviroment_change(filename, self.number,
                                                     self.env)
            self.page = Login()
            self.log = Log()

            self.evt = dict(data=data, company=company)
        except Exception as e:
            print('load config error:', str(e))
            raise
Beispiel #5
0
    def test_gqt_04_applydata(self):
        '''过桥通申请件录入,提交'''

        data, _ = custom.enviroment_change("data_gqt.json", self.number,
                                           self.env)

        self.evt['data'].update(data)
        # self.page = Login()

        # 1 客户信息-业务基本信息
        common.input_customer_base_info(self.page, self.evt['data']['applyVo'])

        # 2 客户基本信息 - 借款人/共贷人/担保人信息
        common.input_customer_borrow_info(self.page,
                                          self.evt['data']['custInfoVo'][0])

        # 3 物业信息
        common.input_cwd_bbi_Property_info(
            self.page, self.evt['data']['applyPropertyInfoVo'][0],
            self.evt['data']['applyCustCreditInfoVo'][0], True, 'gqt')

        # 提交
        common.submit(self.page)
        self.log.info("申请件录入完成提交")