def test_4_ChargeSimpleAndComplex_Exchange_other(self): """ 组合商品与普通商品余额方式门店混合,换的部分退货 :return: """ logging.debug("test_6_ChargeSimpleAndComplex_Exchange_other") if globals()['shopping_order_id'] is not None: exchange_order = market_service.find_order_id(globals()['shopping_order_id'], self._customer.member_number) exchange_order_a = exchange_order + '_0' recharge_param = { 'main_order_id': exchange_order, 'return_price': '0.00', 'reason': '拍错/不想要', 'remarks': '', 'afterSales_info[0][order_id]': exchange_order_a, 'afterSales_info[0][danjia]': '3380.00', 'afterSales_info[0][sku_name]': '腰背夹', 'afterSales_info[0][sku_detail]': '深蓝色 64', 'afterSales_info[0][tiaoma]': 'M216C237C0464', 'afterSales_info[0][kuanhao]': 'M216C237', 'afterSales_info[0][sku_id]': '4879', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg', 'afterSales_info[0][aftersale_num]': '2', 'afterSales_info[0][aftersale_money]': '0.00', 'afterSales_info[0][goods_type]': '1', } market_service.return_order(recharge_param) # 更新充值后的验证数据 self._test_data.update_post_verify_data() # 封装验证值 self.expectedData(-6489 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 6489 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 1 # 总揽退单数 , -6489 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , -0.65 # 验证值 , 0 # M216C237C0458门店库存 , 2 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 0 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 0 # 门店订单数期待增加值 , 1 # 门店退单数期待增加值 , -6489 # 门店销售总额期待增加值 , -6489 # 门店平台销售总额期待增加值 ) # 验证数据 self._data_assertion()
def test_3_return_some(self): """ 退货1件商品 1件选择 男士塑身背心 黑色 76 :return: """ logging.debug("test_return_some") shopping_order_id = globals()['shopping_order_id'] member_number = self._customer.member_number exchangeOrderId = market_service.find_order_id(shopping_order_id, member_number) return_order_id0 = exchangeOrderId + "_0" return_param = {'main_order_id': exchangeOrderId, 'return_price': '2660.00', 'reason': '拍错/不想要', 'remarks': '非', 'afterSales_info[0][order_id]': return_order_id0, 'afterSales_info[0][danjia]': '2660.00', 'afterSales_info[0][sku_name]': '男士塑身背心', 'afterSales_info[0][sku_detail]': '黑色 76', 'afterSales_info[0][tiaoma]': 'M316J232B0176', 'afterSales_info[0][kuanhao]': 'M316J232', 'afterSales_info[0][sku_id]': '4997', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010526413875910.jpg', 'afterSales_info[0][aftersale_num]': '1', 'afterSales_info[0][aftersale_money]': '2660.00', 'afterSales_info[0][goods_type]': '1'} market_service.return_order(return_param) # 更新充值后的验证数据 self._test_data.update_post_verify_data() # 验证值 self.expectedData(-2660 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 0 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 0 # 总揽退单数 , -2660 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , -0.27 # 验证值 , 0 # M216C237C0458门店库存 , 0 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 0 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 1 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 0 # 门店订单数期待增加值 , 0 # 门店退单数期待增加值 , -2660 # 门店销售总额期待增加值 , -2660 # 门店平台销售总额期待增加值 ) # 验证数据 self._data_assertion()
def test_3_return_10pieces(self): """ 退货10件商品数据 腰背夹M216C237,深蓝色,64 退10个 :return: """ logging.debug("test_3_return_10pieces") shopping_order_id = globals()['shopping_order_id'] member_number = self._customer.member_number exchangeOrderId = market_service.find_order_id(shopping_order_id, member_number) return_order_id = exchangeOrderId + "_0" return_param = { 'main_order_id': exchangeOrderId, 'return_price': '31096.00', 'reason': '15天无理由退货', 'remarks': '退货10件', 'afterSales_info[0][order_id]': return_order_id, 'afterSales_info[0][danjia]': '3380.00', 'afterSales_info[0][sku_name]': '腰背夹', 'afterSales_info[0][sku_detail]': '深蓝色 64', 'afterSales_info[0][tiaoma]': 'M216C237C0464', 'afterSales_info[0][kuanhao]': 'M216C237', 'afterSales_info[0][sku_id]': '4879', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg', 'afterSales_info[0][aftersale_num]': '10', 'afterSales_info[0][aftersale_money]': '31096.00', 'afterSales_info[0][goods_type]': '1' } market_service.return_order(return_param) # 更新充值后的验证数据 self._test_data.update_post_verify_data() # 验证值 self.expectedData( -31096.00 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 31096 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 1 # 总揽退单数 , 31096.00 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , -3.11 # 验证值 , 0 # M216C237C0458门店库存 , 10 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 0 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 0 # 门店订单数期待增加值 , 1 # 门店退单数期待增加值 , -31096.00 # 门店销售总额期待增加值 , -31096.00 # 门店平台销售总额期待增加值 ) # 验证数据 self._data_assertion()
def test_4_return_pieces(self): """ 退货预售商品 YS5130N748574 :return: """ logging.debug("test_4_return_10pieces") shopping_order_id = globals()['order_id'] member_number = self._customer.member_number exchangeOrderId = market_service.find_order_id(shopping_order_id, member_number) return_order_id = exchangeOrderId + "_0" return_param = { 'main_order_id': exchangeOrderId, 'return_price': '0.00', 'reason': '15天无理由退货', 'remarks': '测试', 'afterSales_info[0][order_id]': return_order_id, 'afterSales_info[0][danjia]': '1000.00', 'afterSales_info[0][sku_name]': '周自动化测试勿动', 'afterSales_info[0][sku_detail]': '', 'afterSales_info[0][tiaoma]': 'YS5130N748574', 'afterSales_info[0][kuanhao]': '', 'afterSales_info[0][sku_id]': '6430', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019112610521983674.jpg', 'afterSales_info[0][aftersale_num]': '1', 'afterSales_info[0][aftersale_money]': '0.00', 'afterSales_info[0][goods_type]': '2' } market_service.return_order(return_param) # 更新充值后的验证数据 self._test_data.update_post_verify_data() self._test_data_re.update_post_verify_data() # 验证值 self.expectedData( -1000 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 0 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 1 # 总揽退单数 , -1000.00 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , -0.1 # 验证值 , 0 # M216C237C0458门店库存 , 1 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 1 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 0 # 门店订单数期待增加值 , 1 # 门店退单数期待增加值 , -1000.00 # 门店销售总额期待增加值 , -1000.00 # 门店平台销售总额期待增加值 ) # 封装验证值 self._customer_re.expectedData = CustomerVerifyData.expected_data( 0, 0, 0, 0) # 更新转介绍会员验证值 # 验证数据 self._data_assertion() self._data_assertion_re()
def test_4_changer_other(self): """ 换货2件商品数据 腰背夹M216C237,深蓝色,64 换2个 腰背夹M216C237C0464, 深蓝色,58 :return: """ logging.debug("test_4_changer_other") shopping_order_id = globals()['shopping_order_id'] member_number = self._customer.member_number globals()['exchangeOrderId'] = market_service.find_order_id( shopping_order_id, member_number) exchange_order_id = globals()['exchangeOrderId'] + "_0" params = { 'sub_order_id': exchange_order_id, 'goods_num': '2', 'goods_total_price': '6489.60', 'reason': '30天无理由换货', 'remarks': '哈哈', 'type': '2', 'goods_list': '[{"num":2,"sku_id":"4878","sku_name":"腰背夹","sku_detail":"深蓝色 58","tiaoma":"M216C237C0458","kuanhao":"M216C237","danjia":"3380.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg"}]' } market_service.exchange_order(params) # 更新充值后的验证数据 self._test_data.update_post_verify_data() # 验证值 self.expectedData( 0 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 0 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 1 # 总揽订单数 , 0 # 总揽退单数 , 0 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , 0 # 验证值 , -2 # M216C237C0458门店库存 , 2 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 0 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 1 # 门店订单数期待增加值 , 0 # 门店退单数期待增加值 , 0 # 门店销售总额期待增加值 , 0 # 门店平台销售总额期待增加值 ) # 验证数据 self._data_assertion()
def test_4_ChargeSimpleAndComplex_Exchange_other3(self): """ 组合商品与普通商品余额方式门店总仓混合,普通商品2件换货58换64 :return: """ logging.debug("test_3_recharge_return_other") if globals()['shopping_order_id'] is not None: exchange_order = market_service.find_order_id( globals()['shopping_order_id'], self._customer.member_number) exchange_order_id = exchange_order + '_0' recharge_param = { 'sub_order_id': exchange_order_id, 'goods_num': '2', 'goods_total_price': '6489.60', 'reason': '30天无理由换货', 'remarks': '哈哈', 'type': '2', 'goods_list': '[{"num":2,"sku_id":"4879","sku_name":"腰背夹","sku_detail":"深蓝色 64","tiaoma":"M216C237C0464","kuanhao":"M216C237","danjia":"3380.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg"}]' } market_service.exchange_order(recharge_param) # 更新充值后的验证数据 self._test_data.update_post_verify_data() # 封装验证值 self.expectedData( 0 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 0 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 0 # 总揽退单数 , 0 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , 0 # 验证值 , 2 # M216C237C0458门店库存 , -2 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 0 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 1 # 门店订单数期待增加值 , 0 # 门店退单数期待增加值 , 0 # 门店销售总额期待增加值 , 0 # 门店平台销售总额期待增加值 ) # 验证数据 self._data_assertion()
def test_3_ChargePreSaleGoods_Exchange_other(self): """ 预售商品换的两件商品退货 :return: """ logging.debug("test_3_ChargeSimpleAndComplex_Exchange_other") if globals()['order_shopping_id'] is not None: exchange_order = market_service.find_order_id( globals()['order_shopping_id'], self._customer.member_number) return_order_c = exchange_order + "_0" recharge_param = { 'main_order_id': exchange_order, 'return_price': '0.00', 'reason': '15天无理由退货', 'remarks': '不要了', 'afterSales_info[0][order_id]': return_order_c, 'afterSales_info[0][danjia]': '1234.00', 'afterSales_info[0][sku_name]': '何明锐预售', 'afterSales_info[0][sku_detail]': '', 'afterSales_info[0][tiaoma]': 'YS6789N838655', 'afterSales_info[0][kuanhao]': '', 'afterSales_info[0][sku_id]': '6434', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019112758736210149.png', 'afterSales_info[0][aftersale_num]': '1', 'afterSales_info[0][aftersale_money]': '0.00', 'afterSales_info[0][goods_type]': '2', } market_service.return_order(recharge_param) # 更新充值后的验证数据 self._test_data.update_post_verify_data() self._test_data_re.update_post_verify_data() # 封装验证值 self.expectedData( -1234 # 会员消费额 , 0 # 会员积分 , 2 # 会员卡等级 , 1234 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 1 # 总揽退单数 , 0 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , -0.12 # 验证值 , 0 # M216C237C0458门店库存 , 1 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 1 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 0 # 门店订单数期待增加值 , 1 # 门店退单数期待增加值 , -1234 # 门店销售总额期待增加值 , -1234 # 门店平台销售总额期待增加值 ) # 封装验证值 self._customer_re.expectedData = CustomerVerifyData.expected_data( 0, -1234, 0, 0) # 更新转介绍会员验证值 # 验证数据 self._data_assertion() self._data_assertion_re()
def test_3_Combination_and_common_return_part(self): """ 换的商品退货 :return: """ logging.debug("test_3_recharge_return_other") if globals()['shopping_order_id'] is not None: exchange_order_id = market_service.find_order_id( globals()['shopping_order_id'], self._customer.member_number) exchange_order_id_a = exchange_order_id + '_0' #3244.80 return_exchange = { 'main_order_id': exchange_order_id, 'return_price': '0.00', 'reason': '拍错/不想要', 'remarks': '', 'afterSales_info[0][order_id]': exchange_order_id_a, 'afterSales_info[0][danjia]': '3380.00', 'afterSales_info[0][sku_name]': '腰背夹', 'afterSales_info[0][sku_detail]': '深蓝色 64', 'afterSales_info[0][tiaoma]': 'M216C237C0464', 'afterSales_info[0][kuanhao]': 'M216C237', 'afterSales_info[0][sku_id]': '4879', 'afterSales_info[0][img]': 'https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg', 'afterSales_info[0][aftersale_num]': '1', 'afterSales_info[0][aftersale_money]': '0.00', 'afterSales_info[0][goods_type]': '1', 's_confirm': '1' } market_service.return_order(return_exchange) # 更新充值后的验证数据 self._test_data.update_post_verify_data() self._referral.update_post_verify_data() # 封装验证值 self.expectedData( -3244 # 会员消费额 , -3244 # 会员积分 , 2 # 会员卡等级 , 0 # 会员余额 , 0 # 总揽到店次数 , 0 # 总揽新增会员数 , 0 # 总揽订单数 , 1 # 总揽退单数 , -3244 # 总揽销售总额 , 0 # M216C237C0458总仓库存 , 0 # M216C237C0464总仓库存 , 0 # M116E248B0158总仓库存 , 0 # M116E248B0164总仓库存 , 0 # M316J232B01106总仓库存 , 0 # M316J232B0176总仓库存 , 0 # ZH02B215190T796242总仓库存 , -0.32 # 验证值 , 0 # M216C237C0458门店库存 , 1 # M216C237C0464门店库存 , 0 # M116E248B0158门店库存 , 0 # M116E248B0164门店库存 , 0 # M316J232B01106门店库存 , 0 # M316J232B0176门店库存 , 0 # ZH02B215190T796242门店库存 , 0 # 门店到店次数期待增加值 , 0 # 门店新增会员数期待增加值 , 0 # 门店订单数期待增加值 , 0 # 门店退单数期待增加值 , -3244 # 门店销售总额期待增加值 , -3244 # 门店平台销售总额期待增加值 ) self._referral.expectedData = CustomerVerifyData.expected_data( 0, -3244, 5, 0) # 验证数据 self._data_assertion()