Arthur-Wu committed this file on 2024-11-15
This commit is contained in:
34
YiMao/scripts/BusiScenarios/test_C001_CheckADs.py
Normal file
34
YiMao/scripts/BusiScenarios/test_C001_CheckADs.py
Normal file
@ -0,0 +1,34 @@
|
||||
# !/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_CheckADs(unittest.TestCase):
|
||||
'''@Date:: 2024/11/15
|
||||
@Author:: Arthur Wu
|
||||
@Desc::
|
||||
[购物车客户端] 广告验证
|
||||
'''
|
||||
def setUp(self) -> None:
|
||||
self.timestamp = int(time.time())
|
||||
self.ymc = YMClientApi()
|
||||
|
||||
@allure.story('[购物车客户端] 广告验证')
|
||||
def test_C001_CheckADs(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)
|
Reference in New Issue
Block a user