Esempio n. 1
0
    def Off_13(self, userId, orderId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/store/order/cancel'
        params = {
            'token': '12345678901234567890123456789012',
            'orderNo': '1234567890123456'
        }

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        params['orderNo'] = str(orderId)

        time.sleep(1)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 2
0
    def Off_08(self, userId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/store/address/update'
        params = {
            'token': '12345678901234567890123456789012',
            'addressee': '胡健',
            'mobile': '+8613418483933',
            'phone': '075512345678',
            'country': '中国',
            'region': '广东 深圳 龙华区 ',
            'address': '瓦窑排村',
            'isDefault': '1'
        }

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        time.sleep(1)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 3
0
    def Off_20(self, userId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/bindLeanCloudInstallation'
        params = {
            'token': '12345678901234567890123456789012',
            'type': 'ios',
            'deviceId': '2309A4DD-2B97-4B85-8029-9D9CFB1647AD'
        }

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 4
0
    def Off_15_01(self,userId_S,circleId_M,postId_M):
        sessionX = self.Off_00()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/circle/publishVideo'
        params = {'token':'12345678901234567890123456789012', 'des':'这是后台发布视频','url':'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4',\
                  'circleId':'1','longitude':114.416512,'latitude':24.564150,'postId':'1','tags':'风景美如画'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        params['circleId'] = str(circleId_M)
        params['postId'] = str(postId_M)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 5
0
    def Off_16(self, userId_S):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData
        type = 'personal'
        firstName = 'hu'
        lastName = 'HU'
        region = '中国广东省'
        city = '深圳市'
        industry = 'IT'
        career = 'tester'
        usage = '测试'

        url = 'http://172.16.2.101:3000/v1/appsdk/appsdkUserApplySubmit?type=' + type + '&token=' + tokenData + '&firstName=' + firstName + '&lastName=' + lastName + '&region=' + region + '&city=' + city + '&industry=' + industry + '&career=' + career + '&usage=' + usage
        #params = {'type':'personal','token':'12345678901234567890123456789012','firstName':'hu','lastName':'HU','region':'中国广东省','city':'深圳市','industry':'IT','career':'tester','usage':'测试'}

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 6
0
    def Off_15(self,userId_S,circleId_M,postId_M):
        sessionX = self.Off_00()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/share/post/publish'
        params = {'token': '12345678901234567890123456789012', 'postId': '6668', 'sourceUrls': [], 'title': '这是一个胡健测试',
                  'mail': '*****@*****.**', 'des': 'test', 'tags': '风景美如画', 'platform': 'web','circleId':524}
        params['sourceUrls'] = ['','https://zhiyundata.oss-cn-shenzhen.aliyuncs.com/zyplay/share/103640/6641/2020-03-06-11:56:50.mp4']

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        params['circleId'] = str(circleId_M)
        params['postId'] = str(postId_M)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 7
0
    def Off_09(self, userId_S, id):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        params = {'id':1 , 'token':'12345678901234567890123456789012' ,'extraDes':'补充下' ,\
                  'extraAttachments':'https://zyfeedback.oss-cn-shenzhen.aliyuncs.com/feedbacktest/482/2019-04-28-04:27:23.png'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        params['id'] = id

        url = 'http://172.16.2.101:4006/feedback/extraFeedback'

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 8
0
    def Off_14(self, userId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/bind'
        params = {
            'token': '12345678901234567890123456789012',
            'to': '*****@*****.**',
            'vcode': '241195'
        }

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 9
0
    def Off_08(self, userId_S):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        params = {'token': '12345678901234567890123456789012', 'type': '1001',\
                  'hardmodel':'WEEBILL LAB', 'firmwareversion' : '1.81( m0_1.11,m1_1.76)',\
                  'platform' : 'android','phonemodel' : 'HUAWEI','phoneversion' : 'v.2.3.4',\
                  'appversion': '2.2.5', 'lang': 'zh_cn','frequency': '1','title': '编辑反馈test',\
                  'des': '描述', 'attachments': 'https://zyfeedback.oss-cn-shenzhen.aliyuncs.com/feedbacktest/482/2019-04-28-04:08:15.mp4', \
                  'contact': '13418483933', 'remark': '备注'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        url = 'http://172.16.2.101:4006/feedback/feedbackCreate'

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 10
0
    def Off_10(self, userId, addressId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/store/order/submit'
        params = {
            'token': '12345678901234567890123456789012',
            'addressId': '1',
            'payMode': '1',
            'expressMode': '1',
            'invoiceType': '企业',
            'invoiceTitle': '智神信息科技有限公司',
            'invoiceNo': '1234567890',
            'invoiceContent': '明细'
        }

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        params['addressId'] = str(addressId)

        time.sleep(1)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 11
0
    def Off_06(self, userId, skuId, number):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/store/shoppingcart/update'
        params = {
            'token': '12345678901234567890123456789012',
            'skuId': '1',
            'num': '1',
            'isChecked': 1
        }

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        params['skuId'] = str(skuId)
        params['num'] = str(number)

        time.sleep(1)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 12
0
    def Off_16(self, userId_S):
        sessionX = requests.session()
        get_req = Get.Get()
        ass = Assert.Assertions()

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        url = 'http://172.16.2.101:4006/feedback/feedbackGetAliyunOSSToken?token=' + tokenData

        res = get_req.get_model_a(sessionX, url)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 13
0
    def Off_15(self, userId_S, id):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)

        url = 'http://172.16.2.101:4006/back/feedback/activeFeedbackBack?token=' + tokenData + '&id=' + str(
            id)

        res = post_req.post_model_a(sessionX, url)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 14
0
    def Off_21(self, userId_S, sdkVersion):
        sessionX = requests.session()
        get_req = Get.Get()
        ass = Assert.Assertions()

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        url = 'http://172.16.2.101:3000/v1/appsdk/appsdkDownload?token=' + tokenData + '&sdkversion=' + sdkVersion

        res = get_req.get_model_a(sessionX, url)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 15
0
    def Off_17(self, userId):
        sessionX = requests.session()
        get_req = Get.Get()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/profile'
        params = {'userId': '1', 'token': '12345678901234567890123456789012'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData
        params['userId'] = str(userId)

        res = get_req.get_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 16
0
    def Off_18(self, userId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/profile/update'
        params = {'token':'12345678901234567890123456789012', 'avatar':'https://zhiyundata.oss-cn-shenzhen.aliyuncs.com/User_Avatar/17/2019-03-13-11:47:06.png',\
                  'nickname':'hujian','birthday':'2020-03-30','country':'中国','city':'深圳市','introduction':'tester','hobby':'test','sex':'1','adnotification':'0'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 17
0
    def Off_13(self, userId_S, userId_M):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/user/follow'
        params = {'token': '12345678901234567890123456789012', 'to': '1'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        params['id'] = str(userId_M)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 18
0
    def Off_16(self,userId_S,circleId_M):
        sessionX = self.Off_00()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3999/circle/publishTopic'
        params = {'token':'12345678901234567890123456789012', 'title':'这是后台发布话题', 'des':'tTest', 'circleId':'1'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        params['circleId'] = str(circleId_M)

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 19
0
    def Off_03(self, userId, linkId):
        sessionX = requests.session()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/site/add_link_click_log'
        params = {'linkId': 1, 'token': '12134567890121345678901213456789012'}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        params['linkId'] = linkId

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 20
0
    def Off_07(self, userId):
        sessionX = requests.session()
        get_req = Get.Get()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3000/v1/store/shoppingcart/list'
        params = {'token': '12345678901234567890123456789012', 'isChecked': 0}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId)
        params['token'] = tokenData

        time.sleep(1)

        res = get_req.get_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')
Esempio n. 21
0
    def Off_14(self,userId_S, circleId_M):
        sessionX = self.Off_00()
        post_req = Post.Post()
        ass = Assert.Assertions()

        url = 'http://172.16.2.101:3999/circle/publishArticle'
        params = {'token':'12345678901234567890123456789012', 'cover':'https://zhiyundata.oss-cn-shenzhen.aliyuncs.com/User_Avatar/43/2019-06-28-21:01:33.jpg',\
                  'title':'这是后台文章','content':'低头思故乡','circleId':1}

        data = GetMysqlData.GetMysqlData()
        tokenData = data.getTokenByUserId(userId_S)
        params['token'] = tokenData

        params['circleId'] = circleId_M

        res = post_req.post_model_b(sessionX, url, params)
        print(res)

        resCode = res['code']
        resText = res['text']

        assert ass.assert_code(resCode, 200)
        assert ass.assert_in_text(resText, '成功')
        Consts.RESULT_LIST.append('True')