34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# !/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
# @Author:: Arthur Wu
|
|
# @Date:: 2024/11/15-14:43
|
|
# @Description::
|
|
import unittest,allure,time
|
|
from configs.globalObj import LOGGER
|
|
from YiMao.businessFunc.ClientApiLib import YMClientApi
|
|
|
|
|
|
class Test_C001_NonLoginCheckADs(unittest.TestCase):
|
|
'''@Date:: 2024/11/15
|
|
@Author:: Arthur Wu
|
|
@Desc::
|
|
[购物车客户端] 广告验证
|
|
'''
|
|
def setUp(self) -> None:
|
|
self.timestamp = int(time.time())
|
|
self.ymc = YMClientApi()
|
|
|
|
@allure.story('[场景测试] 001-购物车客户端-广告验证')
|
|
def test_C001_NonLoginCheckADs(self):
|
|
allure.dynamic.description("描述:购物车客户端-广告验证")
|
|
AdListData = self.ymc.get_ads_list()
|
|
if "error_msg" not in AdListData:
|
|
adIdList = []
|
|
for ad in AdListData['data']:
|
|
adIdList.append(ad['id'])
|
|
LOGGER.info(f"---adIdList: {adIdList}---\n")
|
|
for adId in adIdList:
|
|
self.ymc.query_ad_detail(str(adId))
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main(verbosity=2) |