Arthur-Wu committed this file on 2024-11-25
This commit is contained in:
parent
1fd2bf9c4e
commit
a18431f788
@ -1,155 +0,0 @@
|
|||||||
# ZeroLib
|
|
||||||
# 2021/10/24 14:50:49
|
|
||||||
'''debug demo'''
|
|
||||||
|
|
||||||
|
|
||||||
''' 获取商品信息接口返回数据
|
|
||||||
v2/shopping/{inputCode}
|
|
||||||
'''
|
|
||||||
get_goods_info = {
|
|
||||||
'code': 0,
|
|
||||||
'msg': '成功',
|
|
||||||
'data': {
|
|
||||||
'flowId': None,
|
|
||||||
'goodsDetailList': None,
|
|
||||||
'barcode': '6925303796426',
|
|
||||||
'inputCode': '6925303796426', # 提取
|
|
||||||
'categoryCode': '1203010107',
|
|
||||||
'goodsName': '统一茄皇蕃茄牛肉面',
|
|
||||||
'goodsCode': '714479',
|
|
||||||
'goodsSpec': '90020',
|
|
||||||
'goodsPic': 'https://ieemoo-storage.obs.cn-east-3.myhuaweicloud.com/lhpic/6925303796426.jpg',
|
|
||||||
'measureProperty': 0,
|
|
||||||
'measureUnit': '桶',
|
|
||||||
'minWeight': 132,
|
|
||||||
'maxWeight': 198,
|
|
||||||
'weight': 165.0, # 提取
|
|
||||||
'price': '0.0',
|
|
||||||
'promotePrice': '5.0',
|
|
||||||
'shoppingBag': False,
|
|
||||||
'promotion': True,
|
|
||||||
'qty': '1',
|
|
||||||
'pkgFlag': False,
|
|
||||||
'goodsBrand': None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
''' 加购商品到购物车接口返回数据
|
|
||||||
shopping/add/retire/purchase
|
|
||||||
'''
|
|
||||||
add_goods_info = {
|
|
||||||
'code': 0,
|
|
||||||
'msg': '成功',
|
|
||||||
'data': {
|
|
||||||
'remainAmount': '13.8',
|
|
||||||
'totalDisc': '0.0',
|
|
||||||
'orderItemList': [
|
|
||||||
{
|
|
||||||
'uuid': ['C186D05F375E4E2F99078456CA809C59'],
|
|
||||||
'qty': 1,
|
|
||||||
'marketPrice': '8.8',
|
|
||||||
'salePrice': '8.80',
|
|
||||||
'totalSalePrice': '8.8',
|
|
||||||
'minWeight': 0,
|
|
||||||
'weight': 0,
|
|
||||||
'maxWeight': 0,
|
|
||||||
'goodsPic': 'https://ieemoo-storage.obs.cn-east-3.myhuaweicloud.com/lhpic/6924743915848.jpg',
|
|
||||||
'barcode': '6924743915848',
|
|
||||||
'inputCode': '6924743915848',
|
|
||||||
'goodsName': '乐事无限翡翠黄瓜味薯片',
|
|
||||||
'goodsPromotionTags': None,
|
|
||||||
'measureProperty': 0,
|
|
||||||
'shoppingBagFlag': False,
|
|
||||||
'activityId': None,
|
|
||||||
'activityDescription': None,
|
|
||||||
'totalPromotionPrice': 0,
|
|
||||||
'categoryCode': None,
|
|
||||||
'isOneBarcodeMore': False,
|
|
||||||
'pkgFlag': False
|
|
||||||
}, {
|
|
||||||
'uuid': ['D7D17C541D7D4006B675D97B9D2B1C99'],
|
|
||||||
'qty': 1,
|
|
||||||
'marketPrice': '5',
|
|
||||||
'salePrice': '5.00',
|
|
||||||
'totalSalePrice': '5',
|
|
||||||
'minWeight': 0,
|
|
||||||
'weight': 0,
|
|
||||||
'maxWeight': 0,
|
|
||||||
'goodsPic': 'https://ieemoo-storage.obs.cn-east-3.myhuaweicloud.com/lhpic/6925303796426.jpg',
|
|
||||||
'barcode': '6925303796426',
|
|
||||||
'inputCode': '6925303796426',
|
|
||||||
'goodsName': '统一茄皇蕃茄牛肉面',
|
|
||||||
'goodsPromotionTags': None,
|
|
||||||
'measureProperty': 0,
|
|
||||||
'shoppingBagFlag': False,
|
|
||||||
'activityId': None,
|
|
||||||
'activityDescription': None,
|
|
||||||
'totalPromotionPrice': 0,
|
|
||||||
'categoryCode': None,
|
|
||||||
'isOneBarcodeMore': False,
|
|
||||||
'pkgFlag': False
|
|
||||||
}],
|
|
||||||
'bagInfoList': None,
|
|
||||||
'couponMap': None,
|
|
||||||
'activityGoodsList': None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# 加购购物嗲
|
|
||||||
add_shoppingbag_info = {
|
|
||||||
'code': 0,
|
|
||||||
'msg': '成功',
|
|
||||||
'data': {
|
|
||||||
'remainAmount': '4.0',
|
|
||||||
'totalDisc': '0.0',
|
|
||||||
'orderItemList': None,
|
|
||||||
'bagInfoList': [
|
|
||||||
{
|
|
||||||
'uuid': ['9C05055A6CD941ECAB377E3E84DA9AE0'],
|
|
||||||
'qty': 2,
|
|
||||||
'marketPrice': '0.8',
|
|
||||||
'salePrice': '0.80',
|
|
||||||
'totalSalePrice': '1.6',
|
|
||||||
'minWeight': 0,
|
|
||||||
'weight': 0,
|
|
||||||
'maxWeight': 0,
|
|
||||||
'goodsPic': 'https://ieemoo-storage.obs.cn-east-3.myhuaweicloud.com/lhpic/6971648922990.jpg',
|
|
||||||
'barcode': '6971648922990',
|
|
||||||
'inputCode': '6971648922990',
|
|
||||||
'goodsName': '武商优家可降解购物袋中号',
|
|
||||||
'goodsPromotionTags': None,
|
|
||||||
'measureProperty': 0,
|
|
||||||
'shoppingBagFlag': True,
|
|
||||||
'activityId': None,
|
|
||||||
'activityDescription': None,
|
|
||||||
'totalPromotionPrice': 0,
|
|
||||||
'categoryCode': None,
|
|
||||||
'isOneBarcodeMore': False,
|
|
||||||
'pkgFlag': False
|
|
||||||
}, {
|
|
||||||
'uuid': ['9B5E7B5CD322490DB318B4FD899E6906'],
|
|
||||||
'qty': 2,
|
|
||||||
'marketPrice': '1.2',
|
|
||||||
'salePrice': '1.20',
|
|
||||||
'totalSalePrice': '2.4',
|
|
||||||
'minWeight': 0,
|
|
||||||
'weight': 0,
|
|
||||||
'maxWeight': 0,
|
|
||||||
'goodsPic': 'https://ieemoo-storage.obs.cn-east-3.myhuaweicloud.com/lhpic/6971648922983.jpg',
|
|
||||||
'barcode': '6971648922983',
|
|
||||||
'inputCode': '6971648922983',
|
|
||||||
'goodsName': '武商优家可降解购物袋大号',
|
|
||||||
'goodsPromotionTags': None,
|
|
||||||
'measureProperty': 0,
|
|
||||||
'shoppingBagFlag': True,
|
|
||||||
'activityId': None,
|
|
||||||
'activityDescription': None,
|
|
||||||
'totalPromotionPrice': 0,
|
|
||||||
'categoryCode': None,
|
|
||||||
'isOneBarcodeMore': False,
|
|
||||||
'pkgFlag': False
|
|
||||||
}],
|
|
||||||
'couponMap': None,
|
|
||||||
'activityGoodsList': None
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
# !/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# @Author:: Arthur Wu
|
|
||||||
# @Description:: 会员登录,领取优惠券
|
|
||||||
# @Date:: 2024/11/21
|
|
@ -64,13 +64,17 @@ class Test_CAnon010(unittest.TestCase):
|
|||||||
AddGoodsInfoAfterDel[k] = v - v2
|
AddGoodsInfoAfterDel[k] = v - v2
|
||||||
LOGGER.info(f"---退购商品后,剩余商品及其数量为:{AddGoodsInfoAfterDel}\n")
|
LOGGER.info(f"---退购商品后,剩余商品及其数量为:{AddGoodsInfoAfterDel}\n")
|
||||||
|
|
||||||
|
last_cart_goods_info = []
|
||||||
cart_goods_info = [GetGoodsInfoResp_01, GetGoodsInfoResp_02]
|
cart_goods_info = [GetGoodsInfoResp_01, GetGoodsInfoResp_02]
|
||||||
for goods_info in cart_goods_info:
|
for goods_info in cart_goods_info:
|
||||||
if goods_info['data']['inputCode'] in AddGoodsInfoAfterDel.keys():
|
if goods_info['data']['inputCode'] in AddGoodsInfoAfterDel.keys():
|
||||||
goods_info['data']['qty'] = AddGoodsInfoAfterDel[goods_info['data']['inputCode']]
|
goods_info['data']['qty'] = AddGoodsInfoAfterDel[goods_info['data']['inputCode']]
|
||||||
|
if goods_info['data']['qty'] != 0:
|
||||||
|
last_cart_goods_info.append(goods_info)
|
||||||
|
else:
|
||||||
|
last_cart_goods_info.append(goods_info)
|
||||||
allure.step("步骤8:获取购物车商品信息")
|
allure.step("步骤8:获取购物车商品信息")
|
||||||
ymc.get_cart_goods_info(cart_goods_info)
|
ymc.get_cart_goods_info(last_cart_goods_info)
|
||||||
allure.step("步骤9:请求订单结算")
|
allure.step("步骤9:请求订单结算")
|
||||||
ymc.request_order_settlement(LoginData)
|
ymc.request_order_settlement(LoginData)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user