def test_get_zanAdd(): Logger.info('-------------------开始执行用例:【点赞:正常】--------------------') url = Config.HttpConfig().zanAdd.url + '?' + Config.HttpConfig( ).zanAdd.param1 + '&' + Config.HttpConfig( ).zanAdd.param2 + '&' + Config.HttpConfig().zanAdd.param3 data = { 'callback': Config.HttpConfig().zanAdd.param1, 'channelCode': Config.HttpConfig().zanAdd.param2 } common_itemconfig_result = Common.revoke_get_request(url, data) #Response.http_code_check(Config.HttpConfig().zanAdd.resp, common_itemconfig_result) Verify.IsTrue( Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig().REQ_CODE) Logger.info('-------------------结束执行用例:【点赞:正常】--------------------')
def test_get_voteA(): Logger.info('-------------------开始执行用例:【投票:正常】--------------------') url = Config.HttpConfig().voteA.url + '?' + Config.HttpConfig( ).voteA.param1 + '&' + Config.HttpConfig( ).voteA.param2 + '&' + Config.HttpConfig( ).voteA.param3 + '&' + Config.HttpConfig( ).voteA.param4 + '&' + Config.HttpConfig().voteA.param5 data = {'callback': "", 'channelCode': ""} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check(Config.HttpConfig().voteA.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_get_UserRewardsByAct_shake(): Logger.info('-------------------开始执行用例:【获取中奖用户信息 :正常】--------------------') url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3( ).getUserRewardsByAct.path + '?' + Config.HttpConfig_ronghe3( ).getUserRewardsByAct.param1 + '&' + Config.HttpConfig_ronghe3( ).getUserRewardsByAct.param2 + '&' + Config.HttpConfig_ronghe3( ).getUserRewardsByAct.param3 data = {} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check( Config.HttpConfig_ronghe3().getUserRewardsByAct.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_ActMaterial_shake(): Logger.info( '-------------------开始执行用例:【获取摇动时的广告图片 :正常】--------------------') url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3( ).getActMaterial.path + '?' + Config.HttpConfig_ronghe3( ).getActMaterial.param1 + '&' + Config.HttpConfig_ronghe3( ).getActMaterial.param2 data = {} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check(Config.HttpConfig_ronghe3().getActMaterial.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_ScreenList_topic(): Logger.info( '-------------------开始执行用例:【获取热门电视下的滚屏话题 :正常】--------------------') url = Config.HttpConfig_ronghe3().URL + Config.HttpConfig_ronghe3( ).getScreenList.path + '?' + Config.HttpConfig_ronghe3( ).getScreenList.param1 + '&' + Config.HttpConfig_ronghe3( ).getScreenList.param2 data = {} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check(Config.HttpConfig_ronghe3().getScreenList.resp, common_itemconfig_result) Verify.IsTrue( Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig_ronghe3().REQ_CODE) 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('-------------------结束执行用例:【提交猜广告结果 :正常】--------------------')
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_UserOrderList(): Logger.info('-------------------开始执行用例:【获取全部订单:正常】--------------------') url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall( ).getUserOrderList.path + '?' + Config.HttpConfig_cashmall( ).getUserOrderList.param1 + '&' + Config.HttpConfig_cashmall( ).getUserOrderList.param2 + '&' + Config.HttpConfig_cashmall( ).getUserOrderList.param3 + '&' + Config.HttpConfig_cashmall( ).getUserOrderList.param4 data = {} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check( Config.HttpConfig_cashmall().getUserOrderList.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_ChannelInfoByCode_cash(): Logger.info( '-------------------开始执行用例:【根据code获取频道:正常】--------------------') url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall( ).getChannelInfoByCode.path + '?' + Config.HttpConfig_cashmall( ).getChannelInfoByCode.param1 + '&' + Config.HttpConfig_cashmall( ).getChannelInfoByCode.param2 data = {} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check( Config.HttpConfig_cashmall().getChannelInfoByCode.resp, common_itemconfig_result) Verify.IsTrue( Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig_cashmall().REQ_CODE) Logger.info( '-------------------结束执行用例:【根据code获取频道:正常】--------------------')
def test_get_TopicA(): Logger.info( '-------------------开始执行用例:【判断新版新闻版式(节目单调用):正常】--------------------') url = Config.HttpConfig().getTopicA.url + '?' + Config.HttpConfig( ).getTopicA.param1 + '&' + Config.HttpConfig().getTopicA.param2 data = { 'callback': Config.HttpConfig().getTopicA.param1, 'channelCode': Config.HttpConfig().getTopicA.param2 } common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check(Config.HttpConfig().getTopicA.resp, common_itemconfig_result) Verify.IsTrue( Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig().REQ_CODE) Logger.info( '-------------------结束执行用例:【判断新版新闻版式(节目单调用):正常】--------------------')
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( '-------------------结束执行用例:【获取已参与猜广告的用户信息 :正常】--------------------')
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( '-------------------结束执行用例:【获取某热门节目下的话题 :正常】--------------------')
def test_insertOrUpdate_Address_cash(): Logger.info('-------------------开始执行用例:【更改地址:正常】--------------------') url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.path + '?' + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.param1 + '&' + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.param2 + '&' + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.param3 + '&' + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.param4 + '&' + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.param5 + '&' + Config.HttpConfig_cashmall( ).insertOrUpdateAddress.param6 data = {} common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check( Config.HttpConfig_cashmall().insertOrUpdateAddress.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_saveComment(): Logger.info('-------------------开始执行用例:【新版新闻评论:正常】--------------------') url = Config.HttpConfig().saveComment.url + '?' + Config.HttpConfig( ).saveComment.param1 + '&' + Config.HttpConfig( ).saveComment.param2 + '&' + Config.HttpConfig( ).saveComment.param3 + '&' + Config.HttpConfig( ).saveComment.param4 + '&' + Config.HttpConfig( ).saveComment.param5 + '&' + Config.HttpConfig().saveComment.param6 data = { 'callback': Config.HttpConfig().saveComment.param1, 'channelCode': Config.HttpConfig().saveComment.param2 } common_itemconfig_result = Common.revoke_get_request(url, data) Response.http_code_check(Config.HttpConfig().saveComment.resp, common_itemconfig_result) Verify.IsTrue( Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig().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_ProductList(): Logger.info('-------------------开始执行用例:【获取全部商品:正常】--------------------') url = Config.HttpConfig_cashmall().URL + Config.HttpConfig_cashmall( ).getProductList.path + '?' + Config.HttpConfig_cashmall( ).getProductList.param1 + '&' + Config.HttpConfig_cashmall( ).getProductList.param2 + '&' + Config.HttpConfig_cashmall( ).getProductList.param3 + '&' + Config.HttpConfig_cashmall( ).getProductList.param4 + '&' + Config.HttpConfig_cashmall( ).getProductList.param5 + '&' + Config.HttpConfig_cashmall( ).getProductList.param6 + '&' + Config.HttpConfig_cashmall( ).getProductList.param7 data = { 'callback': Config.HttpConfig_cashmall().getProductList.param1, 'channelCode': Config.HttpConfig_cashmall().getProductList.param2 } common_itemconfig_result = Common.revoke_get_request(url, data) #Response.http_code_check(Config.HttpConfig_cashmall().getProductList.resp, common_itemconfig_result) Verify.IsTrue( Common.get_http_code(url, data) == requests.codes.ok, Config.HttpConfig_cashmall().REQ_CODE) Logger.info('-------------------结束执行用例:【获取全部商品:正常】--------------------')