Exemplo n.º 1
0
 def setUpClass(cls):
     Pylog.info("***************开始执行用例(ChgonProcess)***************")
     cls.config = globalvars.config()
     cls.paramConfig = paramConfig.ParamConfig()
     cls.memberaction = MemberAction()
     cls.payment = payment.Payment()
     cls.membername = globalvars.get_value("membername")
Exemplo n.º 2
0
    def setUpClass(cls):
        Pylog.info("***************开始执行用例(CmsProcess)***************")
        cls.auth = Authors(types="member")
        cls.config = globalvars.config()
        cls.paramConfig = paramConfig.ParamConfig()
        cls.content = content.Content()
        cls.memberaction = MemberAction()
        cls.uaa = uaa.Uaa()
        cls.payment = payment.Payment()
        cls.membername = globalvars.get_value("membername")
        owner = cls.config.owner

        #获取图片ID
        actTitlePic = cls.content.upLoadFile('activity.png')
        carouselTitlePic = cls.content.upLoadFile('carousel.png')
        site_iconUrl = cls.content.upLoadFile('H5siteicon.png')
        site_logoUrl = cls.content.upLoadFile('H5sitelogo.png')
        site_h5LogoUrl = cls.content.upLoadFile('H5loginlogo.png')

        #优惠活动参数
        globalvars.set_value(
            "actParam", {
                "title": "自动化测试",
                "weight": "1",
                "titlePic": actTitlePic,
                "content": "<p>自动化测试</p>",
                "beginTime": 1523894400000,
                "endTime": 1523980799000
            })
        globalvars.set_value("actTitle",
                             globalvars.get_value("actParam")['title'])
        globalvars.set_value("actTitlePic",
                             globalvars.get_value("actParam")['titlePic'])
        globalvars.set_value("actContent",
                             globalvars.get_value("actParam")['content'])
        globalvars.set_value("actWeight",
                             globalvars.get_value("actParam")['weight'])

        #轮播图参数
        globalvars.set_value(
            "carouselParam", {
                "beginTime":
                1523894400000,
                "delayTime":
                "1",
                "endTime":
                1523980799000,
                "itemPO": [{
                    "link": "http://www.baidu.com",
                    "titlePic": carouselTitlePic
                }, {
                    "link": "",
                    "titlePic": ""
                }],
                "title":
                "自动化测试"
            })
        globalvars.set_value("carouselTitle",
                             globalvars.get_value("carouselParam")['title'])
        globalvars.set_value(
            "carouselTitlePic",
            globalvars.get_value("carouselParam")['itemPO'][0]['titlePic'])
        globalvars.set_value(
            "carouselDelayTime",
            globalvars.get_value("carouselParam")['delayTime'])
        globalvars.set_value(
            "carouselLink",
            globalvars.get_value("carouselParam")['itemPO'][0]['link'])

        #站点信息参数
        # 查询站点信息
        cls.content.site_view()
        globalvars.set_value(
            "siteParam", {
                "cid": globalvars.get_value("site_cid"),
                "platId": owner["env"]["platId"],
                "iconUrl": site_iconUrl,
                "logoUrl": site_logoUrl,
                "status": 1,
                "h5Name": "自动化测试站点名称",
                "h5SiteUrl": "",
                "h5LogoUrl": site_h5LogoUrl
            })
        globalvars.set_value("site_h5Name",
                             globalvars.get_value("siteParam")['h5Name'])
        globalvars.set_value("site_iconUrl", site_iconUrl)
        globalvars.set_value("site_logoUrl", site_logoUrl)
        globalvars.set_value("site_h5LogoUrl", site_h5LogoUrl)
Exemplo n.º 3
0
 def setUpClass(cls):
     Pylog.info("***************开始执行用例(DrawProcess)***************")
     cls.memberaction = MemberAction()
     cls.payment = payment.Payment()
     cls.statistics = statistics.Statistics()
     cls.membername = globalvars.get_value("membername")