Exemple #1
0
def test_get_heartbeat():
    Logger.info('-------------------开始执行用例:【电视剧心跳:正常】--------------------')
    url = Config.HttpConfig().heartbeat.url + '?' + Config.HttpConfig(
    ).heartbeat.param1
    data = {'callback': Config.HttpConfig().heartbeat.param1}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().heartbeat.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig().REQ_CODE)
    Logger.info('-------------------结束执行用例:【电视剧心跳:正常】--------------------')
def test_get_Share_topic():
    Logger.info('-------------------开始执行用例:【获取朋友圈分享配置:正常】--------------------')
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).getShare.path + '?' + Config.HttpConfig_ronghe3(
    ).getShare.param1 + '&' + Config.HttpConfig_ronghe3().getShare.param2
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig_ronghe3().getShare.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info('-------------------结束执行用例:【获取朋友圈分享配置:正常】--------------------')
Exemple #3
0
def test_get_Address_cash():
    Logger.info('-------------------开始执行用例:【获取地址:正常】--------------------')
    url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall(
    ).getAddress.path + '?' + Config.HttpConfig_cashmall(
    ).getAddress.param1 + '&' + Config.HttpConfig_cashmall().getAddress.param2
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig_cashmall().getAddress.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_cashmall().REQ_CODE)
    Logger.info('-------------------结束执行用例:【获取地址:正常】--------------------')
def test_login_ByAct_shake():
    Logger.info('-------------------开始执行用例:【登陆 :正常】--------------------')
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).loginByAct.path + '?' + Config.HttpConfig_ronghe3(
    ).loginByAct.param1 + '&' + Config.HttpConfig_ronghe3().loginByAct.param2
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig_ronghe3().loginByAct.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info('-------------------结束执行用例:【登陆 :正常】--------------------')
Exemple #5
0
def test_get_commentA():
    Logger.info('-------------------开始执行用例:【发表评论:正常】--------------------')
    url = Config.HttpConfig().comment.url + '?' + Config.HttpConfig(
    ).comment.param1 + '&' + Config.HttpConfig(
    ).comment.param2 + '&' + Config.HttpConfig(
    ).comment.param3 + '&' + Config.HttpConfig(
    ).comment.param4 + '&' + Config.HttpConfig(
    ).comment.param5 + '&' + Config.HttpConfig().comment.param6
    data = {'callback': "", 'channelCode': ""}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().comment.resp,
                             common_itemconfig_result)
    #Verify.IsTrue(Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig().REQ_CODE)
    Logger.info('-------------------结束执行用例:【发表评论:正常】--------------------')
def test_get_List():
    Logger.info('-------------------开始执行用例:【获得节目单信息:正常】--------------------')
    url = Config.HttpConfig().getListProgram.url + '?' + Config.HttpConfig(
    ).getListProgram.param1 + '&' + Config.HttpConfig().getListProgram.param2
    data = {
        'callback': Config.HttpConfig().getListProgram.param1,
        'channelCode': Config.HttpConfig().getListProgram.param2
    }
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().getListProgram.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig().REQ_CODE)
    Logger.info('-------------------结束执行用例:【获得节目单信息:正常】--------------------')
def test_get_TopicDetail():
    Logger.info('-------------------开始执行用例:【新版新闻获取投票:正常】--------------------')
    url = Config.HttpConfig().getTopicDetail.url + '?' + Config.HttpConfig(
    ).getTopicDetail.param1 + '&' + Config.HttpConfig(
    ).getTopicDetail.param2 + '&' + Config.HttpConfig().getTopicDetail.param3
    data = {
        'callback': Config.HttpConfig().getTopicDetail.param1,
        'channelCode': Config.HttpConfig().getTopicDetail.param2
    }
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().getTopicDetail.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig().REQ_CODE)
    Logger.info('-------------------结束执行用例:【新版新闻获取投票:正常】--------------------')
def test_get_userredinfo():
    Logger.info('-------------------开始执行用例:【获得用户红包信息:正常】--------------------')
    url = Config.HttpConfig().getUserRedInfo.url + '?' + Config.HttpConfig(
    ).getUserRedInfo.param1 + '&' + Config.HttpConfig().getUserRedInfo.param2
    data = {
        'callback': Config.HttpConfig().getUserRedInfo.param1,
        'channelCode': Config.HttpConfig().getUserRedInfo.param2
    }
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().getUserRedInfo.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig().REQ_CODE)
    Logger.info('-------------------结束执行用例:【获得用户红包信息:正常】--------------------')
    Logger.info('返回值暂时有问题')
def test_save_UserResult_topic():
    Logger.info('-------------------开始执行用例:【提交猜广告结果 :正常】--------------------')
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).saveUserResult.path + '?' + Config.HttpConfig_ronghe3(
    ).saveUserResult.param1 + '&' + Config.HttpConfig_ronghe3(
    ).saveUserResult.param2 + '&' + Config.HttpConfig_ronghe3(
    ).saveUserResult.param3 + '&' + Config.HttpConfig_ronghe3(
    ).saveUserResult.param4
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig_ronghe3().saveUserResult.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info('-------------------结束执行用例:【提交猜广告结果 :正常】--------------------')
Exemple #10
0
def test_get_GoodsPool():
    Logger.info('-------------------开始执行用例:【获取首页商品展示:正常】--------------------')
    url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall(
    ).getGoodsPool.path + '?' + Config.HttpConfig_cashmall(
    ).getGoodsPool.param1 + '&' + Config.HttpConfig_cashmall(
    ).getGoodsPool.param2
    data = {
        'callback': Config.HttpConfig_cashmall().getGoodsPool.param1,
        'channelCode': Config.HttpConfig_cashmall().getGoodsPool.param2
    }
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig_cashmall().getGoodsPool.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_cashmall().REQ_CODE)
    Logger.info('-------------------结束执行用例:【获取首页商品展示:正常】--------------------')
def test_get_ProgramTopicListByPage_topic():
    Logger.info(
        '-------------------开始执行用例:【获取某热门节目下的话题 :正常】--------------------')
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).getProgramTopicListByPage.path + '?' + Config.HttpConfig_ronghe3(
    ).getProgramTopicListByPage.param1 + '&' + Config.HttpConfig_ronghe3(
    ).getProgramTopicListByPage.param2 + '&' + Config.HttpConfig_ronghe3(
    ).getProgramTopicListByPage.param3
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(
        Config.HttpConfig_ronghe3().getProgramTopicListByPage.resp,
        common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info(
        '-------------------结束执行用例:【获取某热门节目下的话题 :正常】--------------------')
Exemple #12
0
def test_get_AudiNewsSize():
    Logger.info(
        '-------------------开始执行用例:【每隔十秒拉取最新审核新闻的长度:正常】--------------------')
    url = Config.HttpConfig().getAuditNewsSize.url + '?' + Config.HttpConfig(
    ).getAuditNewsSize.param1 + '&' + Config.HttpConfig(
    ).getAuditNewsSize.param2
    data = {
        'callback': Config.HttpConfig().getAuditNewsSize.param1,
        'channelCode': Config.HttpConfig().getAuditNewsSize.param2
    }
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().getAuditNewsSize.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig().REQ_CODE)
    Logger.info(
        '-------------------结束执行用例:【每隔十秒拉取最新审核新闻的长度:正常】--------------------')
def test_get_ActUsersAnswered_topic():
    Logger.info(
        '-------------------开始执行用例:【获取已参与猜广告的用户信息 :正常】--------------------')
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).getActUsersAnswered.path + '?' + Config.HttpConfig_ronghe3(
    ).getActUsersAnswered.param1 + '&' + Config.HttpConfig_ronghe3(
    ).getActUsersAnswered.param2 + '&' + Config.HttpConfig_ronghe3(
    ).getActUsersAnswered.param3
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(
        Config.HttpConfig_ronghe3().getActUsersAnswered.resp,
        common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info(
        '-------------------结束执行用例:【获取已参与猜广告的用户信息 :正常】--------------------')
Exemple #14
0
def test_get_appealOrder():
    Logger.info('-------------------开始执行用例:【申请售后:正常】--------------------')
    url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall(
    ).appealOrder.path + '?' + Config.HttpConfig_cashmall(
    ).appealOrder.param1 + '&' + Config.HttpConfig_cashmall(
    ).appealOrder.param2 + '&' + Config.HttpConfig_cashmall(
    ).appealOrder.param3 + '&' + Config.HttpConfig_cashmall(
    ).appealOrder.param4 + '&' + Config.HttpConfig_cashmall(
    ).appealOrder.param5 + '&' + Config.HttpConfig_cashmall(
    ).appealOrder.param6 + '&' + Config.HttpConfig_cashmall(
    ).appealOrder.param7
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig_cashmall().appealOrder.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_cashmall().REQ_CODE)
    Logger.info('-------------------结束执行用例:【申请售后:正常】--------------------')
def test_get_ProgramStatisticsNum_topic():
    Logger.info(
        '-------------------开始执行用例:【获取热门电视下的话题数量和评论数量 :正常】--------------------'
    )
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).getProgramStatisticsNum.path + '?' + Config.HttpConfig_ronghe3(
    ).getProgramStatisticsNum.param1 + '&' + Config.HttpConfig_ronghe3(
    ).getProgramStatisticsNum.param2
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(
        Config.HttpConfig_ronghe3().getProgramStatisticsNum.resp,
        common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info(
        '-------------------结束执行用例:【获取热门电视下的话题数量和评论数量 :正常】--------------------'
    )
def test_get_ChannelConfig_shake():
    Logger.info(
        '-------------------开始执行用例:【获取频道信息(进入按钮图片enterBtnImg、互动背景图actBgImg、摇宝图片yaoBaoImg) :正常】--------------------'
    )
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).getChannelConfigShake.path + '?' + Config.HttpConfig_ronghe3(
    ).getChannelConfigShake.param1 + '&' + Config.HttpConfig_ronghe3(
    ).getChannelConfigShake.param2 + '&' + Config.HttpConfig_ronghe3(
    ).getChannelConfigShake.param3
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(
        Config.HttpConfig_ronghe3().getChannelConfigShake.resp,
        common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info(
        '-------------------结束执行用例:【获取频道信息(进入按钮图片enterBtnImg、互动背景图actBgImg、摇宝图片yaoBaoImg) :正常】--------------------'
    )
def test_get_ChannelConfigByType_topic():
    Logger.info(
        '-------------------开始执行用例:【显示设置(是否显示理财、电影、精彩推荐等):正常】--------------------'
    )
    url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3(
    ).getChannelConfigByType.path + '?' + Config.HttpConfig_ronghe3(
    ).getChannelConfigByType.param1 + '&' + Config.HttpConfig_ronghe3(
    ).getChannelConfigByType.param2 + '&' + Config.HttpConfig_ronghe3(
    ).getChannelConfigByType.param3
    data = {}
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(
        Config.HttpConfig_ronghe3().getChannelConfigByType.resp,
        common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig_ronghe3().REQ_CODE)
    Logger.info(
        '-------------------结束执行用例:【显示设置(是否显示理财、电影、精彩推荐等):正常】--------------------'
    )
def test_get_saveTipoff():
    Logger.info('-------------------开始执行用例:【提交爆料:正常】--------------------')
    url = Config.HttpConfig().saveTipoff.url + '?' + Config.HttpConfig(
    ).saveTipoff.param1 + '&' + Config.HttpConfig(
    ).saveTipoff.param2 + '&' + Config.HttpConfig(
    ).saveTipoff.param3 + '&' + Config.HttpConfig(
    ).saveTipoff.param4 + '&' + Config.HttpConfig(
    ).saveTipoff.param5 + '&' + Config.HttpConfig(
    ).saveTipoff.param6 + '&' + Config.HttpConfig(
    ).saveTipoff.param7 + '&' + Config.HttpConfig(
    ).saveTipoff.param8 + '&' + Config.HttpConfig().saveTipoff.param9
    data = {
        'callback': Config.HttpConfig().saveTipoff.param1,
        'channelCode': Config.HttpConfig().saveTipoff.param2
    }
    common_itemconfig_result = Common.revoke_get_request(url, data)
    Response.http_code_check(Config.HttpConfig().saveTipoff.resp,
                             common_itemconfig_result)
    Verify.IsTrue(
        Common.get_http_code(url, data) == requests.codes.ok,
        Config.HttpConfig().REQ_CODE)
    Logger.info('-------------------结束执行用例:【提交爆料:正常】--------------------')