Arthur-Wu committed this file on 2024-11-21
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 匿名加购计件商品,并结算
|
||||
# @Date:: 2024/11/21
|
||||
import unittest,allure,time
|
||||
import unittest,allure,time,pytest
|
||||
from configs.globalObj import LOGGER
|
||||
from YiMao.businessFunc.ClientApiLib import YMClientApi
|
||||
from YiMao.data.WuShangSceneTestData import *
|
||||
@ -11,21 +11,25 @@ from YiMao.data.WuShangSceneTestData import *
|
||||
|
||||
DescName = "Anon015-匿名加购计件商品,并结算"
|
||||
@allure.story(f'[场景测试] {DescName}验证')
|
||||
class Test_CAnon003(unittest.TestCase):
|
||||
class Test_CAnon015(unittest.TestCase):
|
||||
f'''@Date:: 2024/11/15
|
||||
@Author:: Arthur Wu
|
||||
@Desc::
|
||||
[购物车客户端] {DescName}
|
||||
1、武商测试环境,计件商品inputcode为:
|
||||
|
||||
1、步骤
|
||||
1)加购计件或计重商品,返回为待核验商品
|
||||
2)点击结算,校验返回结果“不可结算”
|
||||
3)调用管理平台“待核验商品-审核通过”接口
|
||||
4)点击结算,校验返回结果“可结算”
|
||||
'''
|
||||
def setUp(self) -> None:
|
||||
self.timestamp = int(time.time())
|
||||
self.ymc = YMClientApi(ShoppingCartMac)
|
||||
# 会员有优惠商品暂未提供
|
||||
self.vip_goods_inputcode = VipGoodsInputcode # 统一番茄牛肉面
|
||||
# self.vip_goods_inputcode = VipGoodsInputcode # 统一番茄牛肉面
|
||||
self.vip_goods_inputcode = "124312354" # 统一番茄牛肉面
|
||||
|
||||
def test_CAnon003_AddMemberProductsForPurchase(self):
|
||||
def test_CAnon015(self):
|
||||
allure.dynamic.description(f"描述:{DescName}")
|
||||
allure.step("步骤1:session开始")
|
||||
self.ymc.session_start()
|
||||
@ -43,7 +47,7 @@ class Test_CAnon003(unittest.TestCase):
|
||||
self.ymc.request_order_settlement(LoginData)
|
||||
else:
|
||||
LOGGER.info(f"---商品 {self.vip_goods_inputcode} 不存在")
|
||||
raise AssertionError(f"商品 {self.vip_goods_inputcode} 不存在")
|
||||
pytest.fail(f"---商品 {self.vip_goods_inputcode} 不存在")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Reference in New Issue
Block a user