示例#1
0
    def test__huabo1(self,browser,login_m,price,activetype,settlementType,imei,mark):
        '''
        划拨-文件方式
        '''
        fh = FlowCardManage(browser)
        sleep(1)
        fh.card_manage.click()
        fh.flow_card_manage.click()
        fh.transferring.click()
        #划拨到假卡专用户
        fh.hbcustomername.click()
        fh.hbtestcustomer.click()
        fh.hbprice=(price)
        fh.hbFile.send_keys(iccid_path)
        Select(fh.hbactivetype).select_by_visible_text(activetype)
        Select(fh.hbsettlementType).select_by_visible_text(settlementType)
        Select(fh.hbimeiBind).select_by_visible_text(imei)
        fh.hbRemark=(mark)
        fh.huaboSave.click()


        # 执行SQL语句
        sql='''
        SELECT customer_name FROM `t_customer` t1 left join t_hierarchy t2 on  substring_index( t2.hierarchy_code, "_",- 1 ) = t1.uuid where t2.iccid_ = '%s'
        '''

        data=(we.get_some(iccid_path))

        self.customername = mq.execQuery(sql % data)
        assert self.customername[0][0] == "假卡专用户"
示例#2
0
    def test__huabo2(self, browser,login_m, price1, activetype1, settlementType1, imei1, mark1):
        '''
        回划硕汉卡库,按iccid开始结束段
        '''
        sql_a = '''
                        SELECT customer_name FROM `t_customer` t1 left join t_hierarchy t2 on  substring_index( t2.hierarchy_code, "_",- 1 ) = t1.uuid where t2.iccid_ = '%s'
                        '''

        sql_b = '''
                        SELECT remark FROM `t_card_store` where iccid = '%s'
                        '''
        #获取到卡号iccid
        data = (we.get_some(iccid_path))


        fh = FlowCardManage(browser)
        sleep(1)
        fh.card_manage.click()
        fh.flow_card_manage.click()
        fh.transferring.click()
        fh.hbcustomername.click()
        # 划拨回硕汉卡库
        fh.hbtestcustomer1.click()
        fh.hbprice = (price1)
        fh.starticcid=(data)
        fh.endiccid=(data)
        Select(fh.hbactivetype).select_by_visible_text(activetype1)
        Select(fh.hbsettlementType).select_by_visible_text(settlementType1)
        Select(fh.hbimeiBind).select_by_visible_text(imei1)
        fh.hbRemark = (mark1)
        fh.huaboSave.click()

        self.customername = mq.execQuery(sql_a % data)
        self.test_mark=mq.execQuery(sql_b % data)

        assert self.customername[0][0] == "硕汉卡库" and self.test_mark[0][0] == mark1