コード例 #1
0
    def test_login_success(self):
        ''' 完备的参数'''
        sdata = {
            "userId": "99999958",
            "bankLogo": "图片base64转码字符串,用MEDIUMTEXT字段存储",
            "cardNo": "63282347923401234",
            "cardBank": "建设银行",
            "cardName": "张三",
            'sourceFrom': '1'
        }
        #data = ["userId","1235","bankLogo","图片base64转码字符串,用MEDIUMTEXT字段存储","cardNo","63282347923401234","cardBank","建设银行","持卡人姓名","张三"]
        #sourceFrom 平台标识 1为延保
        list = []
        datalist = []
        for i in sdata.keys():
            list.append(i)

        for i in list:
            a = sdata[i]

            data = i + '=' + a
            datalist.append(data)

        datastr = '&'.join(datalist)

        sign = take_sign.sign_data(dict_data=sdata)
        params = '?' + datastr + '&sign=' + sign
        print(params)
        r = self.s.get(self.base_url + params)
        self.result = r.json()
コード例 #2
0
    def test_login_success(self):
        ''' 完备的参数'''

        data = {"apply_no": "F20170821071109147474"}
        #sourceFrom 平台标识 1为延保
        sign = take_sign.sign_data(dict_data=data)

        params = '?apply_no=F20170821071109147474&sign=' + sign
        print(params)
        r = self.s.get(self.base_url + params)
        self.result = r.status_code
コード例 #3
0
    def test_login_success(self):
        ''' 完备的参数'''

        data = {"apply_no":"PAY2017071612121111","review_status":"1",}
        #sourceFrom 平台标识 1为延保
        sign = take_sign.sign_data(dict_data=data)

        params = '?apply_no=PAY2017071612121111&review_status=1&sign='+sign
        print(params)
        r = self.s.get(self.base_url+params)
        self.result = r.json()
コード例 #4
0
    def test_login_success(self):
        ''' 完备的参数'''

        params = {"user_id": "100","trade_id": "100","product_no": "YB00002","trade_time":self.nowtime,
        "order_no": "YB05000114162960","product_price": "2279.00","sourceFrom":"1"}
        sign = take_sign.sign_data(dict_data=params)
        params['sign']=sign
        print(params)
        r = self.s.post(self.base_url,data=params)
        self.result = r.json()
        #self.result = r.status_code

        self.assertEqual(self.result['code'],0)
コード例 #5
0
    def test_login_success(self):
        ''' 完备的参数'''

        params = {"user_id": "1111", 'sourceFrom': '1'}
        #sourceFrom 平台标识 1为延保
        sign = take_sign.sign_data(dict_data=params)
        params['sign'] = sign
        print(params)
        r = self.s.post(self.base_url, data=params)
        #self.result = r.json()
        self.result = r.status_code

        #self.assertEqual(self.result['code'],0)
        self.assertEqual(self.result, 200)
コード例 #6
0
    def test_login_success(self):
        ''' 完备的参数'''
        sdata = {
            "user": {
                "userId": "1",
                "userName": "******",
                "tel": "15151876543",
                "loginAcc": "15151876543"
            },
            "company": {
                "companyId": "2",
                "companyName": "张三家的公司",
                "connectUser": "******",
                "connectTel": "15151987654",
                "businessLicenseNo": "sadjg1902023984",
                "businessLicense": "http://www.baidu.com/1.jpg",
                "organizationNo": "sadk2384798",
                "organizationCertificate": "http://www.baidu.com/2.jpg",
                "loginAcc": "15151876543"
            },
            'subChannel': {
                "channelId": "3",
                "channelName": "渠道名称1",
            },
            'generalChannel': {
                "channelId": "4",
                "channelName": "渠道名称2"
            },
            'sourceFrom': '1'
        }
        #data = ["userId","1235","bankLogo","图片base64转码字符串,用MEDIUMTEXT字段存储","cardNo","63282347923401234","cardBank","建设银行","持卡人姓名","张三"]
        #sourceFrom 平台标识 1为延保

        sdata["user"] = json.dumps(sdata["user"])
        sdata["company"] = json.dumps(sdata["company"])
        sdata["subChannel"] = json.dumps(sdata["subChannel"])
        sdata["generalChannel"] = json.dumps(sdata["generalChannel"])

        sign = take_sign.sign_data(dict_data=sdata)
        sdata['sign'] = sign
        print(sign)

        r = self.s.post(self.base_url, data=sdata)
        self.result = r.json()
コード例 #7
0
    def test_login_success(self):
        ''' 完备的参数'''

        params = {
            "user_id": "11111",
            "card_no": "62222222222222",
            "card_open": "中国农业银行苏州支行",
            "card_name": "张三",
            "trade_amount": "100.00",
            "withdrawPwd": "123456",
            'sourceFrom': '1'
        }
        #sourceFrom 平台标识 1为延保
        sign = take_sign.sign_data(dict_data=params)
        params['sign'] = sign
        print(params)
        r = self.s.post(self.base_url, data=params)
        #self.result = r.json()
        self.result = r.status_code

        #self.assertEqual(self.result['code'],0)
        self.assertEqual(self.result, 200)
コード例 #8
0
    def test_login_success(self):
        ''' 完备的参数'''

        params = {
            "user_id": "1235",
            "startDate": "2017-08-15 12:00:00",
            "endDate": "2017-08-15 12:00:00",
            "pageNo": "1",
            "pageSize": "10",
            "status": "1",
            'sourceFrom': '1'
        }
        #sourceFrom 平台标识 1为延保
        sign = take_sign.sign_data(dict_data=params)
        params['sign'] = sign
        print(params)
        r = self.s.post(self.base_url, data=params)
        #self.result = r.json()
        self.result = r.status_code

        #self.assertEqual(self.result['code'],0)
        self.assertEqual(self.result, 200)