示例#1
0
    def testdetail(self,data):
        '''活动排期管理接口:查看活动排期详细#/project/activityPlan/detail'''

        # 查看活动排期详细
        res = scripts.loadtestInterface(
            instance=HttpWebRequest(),
            data=data['Detail'],
            desc=data['Desc'],
            url=data['Url'],
            instance_pro='post'
        )
        #断言
        self.assertEqual(res['code'],0,res['msg'])
示例#2
0
    def testlist(self,data):
        '''项目管理接口:查询店铺列表#/project/shops/list'''

        #查询店铺列表
        res = scripts.loadtestInterface(
            instance=HttpWebRequest(),
            data=data['List'],
            desc=data['Desc'],
            url=data['Url'],
            instance_pro='post'
        )
        #断言
        self.assertEqual(res['code'],0,res['msg'])#断言
示例#3
0
    def testgetlist(self,data):
        '''活动排期管理接口:查询活动排期不分页#/project/activityPlan/planMachineDetailList'''

        # 查询活动排期列表不分页
        res = scripts.loadtestInterface(
            instance=HttpWebRequest(),
            data=data['GetList'],
            desc=data['Desc'],
            url=data['Url'],
            instance_pro='post'
        )
        #断言
        self.assertEqual(res['code'],0,res['msg'])
示例#4
0
    def testupdate(self,data):
        '''活动管理接口:更新活动信息#/project/activity/update'''

        # 更新活动信息
        res = scripts.loadtestInterface(
            instance=HttpWebRequest(),
            data=data['Updata'],
            desc=data['Desc'],
            url=data['Url'],
            instance_pro='post'
        )
        #断言
        self.assertEqual(res['code'],0,res['msg'])
示例#5
0
    def testdetele(self, data):
        '''渠道管理接口:删除渠道信息#/project/channel1/delete'''

        # 删除渠道
        res = scripts.loadtestInterface(instance=HttpWebRequest(),
                                        data=data['detele'],
                                        desc=data['Desc'],
                                        url=data['Url'],
                                        instance_pro='post')
        #断言
        self.assertEqual(res['code'], 0, res['msg'])

        @classmethod
        def tearDownClass(cls):
            pass
示例#6
0
    def testdetele(self, data):
        '''点位管理接口:删除点位信息#/machine/locale/delete'''

        # 更新点位信息
        res = scripts.loadtestInterface(instance=HttpWebRequest(),
                                        data=data['detele'],
                                        desc=data['Desc'],
                                        url=data['Url'],
                                        instance_pro='post')
        #断言
        self.assertEqual(res['code'], 0, res['msg'])

        @classmethod
        def tearDownClass(cls):
            pass
示例#7
0
 def testadd(self, data):
     '''项目管理接口:新添加商品#/project/goods/add'''
     b = data['Add']['code']
     print b
     newcode = b + str(scripts.sjshu())
     print newcode
     data['Add']['code'] = newcode
     # 新添加商品
     res = scripts.loadtestInterface(instance=HttpWebRequest(),
                                     instance_pro='post',
                                     data=data['Add'],
                                     desc=data['Desc'],
                                     url=data['Url'])
     #断言
     self.assertEqual(res['code'], 0, res['msg'])
示例#8
0
 def testadd(self, data):
     '''点位管理接口:新添加点位#/machine/locale/add'''
     b = data['Add']['name']
     print b
     newcode = b + str(scripts.sjshu())
     print newcode
     data['Add']['name'] = newcode
     # 新添加点位
     res = scripts.loadtestInterface(instance=HttpWebRequest(),
                                     instance_pro='post',
                                     data=data['Add'],
                                     desc=data['Desc'],
                                     url=data['Url'])
     # print res
     # print type(res)
     #断言
     self.assertEqual(res['code'], 0, res['msg'])
示例#9
0
    def testselect(self, data):
        '''活动排期管理接口:选择机器#//project/activityPlan/selectAreaMachines'''

        # 选择机器
        res = scripts.loadtestInterface(
            instance=HttpWebRequest(),
            data=data['select'],
            desc=data['Desc'],
            url=data['Url'],
            instance_pro='post'
        )
        # 断言
        self.assertEqual(res['code'], 0, res['msg'])


        @classmethod
        def tearDownClass(cls):
            pass
示例#10
0
    def testadd(self,data):
        '''活动管理接口:新添加活动#/project/activity/add'''
        b = data['Add']['code']
        c = data['Add']['name']
        newcode = b + str(scripts.sjshu())
        newname = c + str(scripts.sjshu())
        data['Add']['code'] = newcode
        data['Add']['name'] = newname
        # 新添加活动
        res = scripts.loadtestInterface(
            instance=HttpWebRequest(),
            instance_pro='post',
            data=data['Add'],
            desc=data['Desc'],
            url=data['Url']

        )
        #断言
        self.assertEqual(res['code'],0,res['msg'])