Exemple #1
0
    def test_2_changer_some(self):
        """
        换货1件商品数据
        男士塑身背心M316J232,黑色,106 换 黑色 76
        :return:
        """
        logging.debug("test_2_changer_10pieces")
        if globals()['shopping_order_id'] is not None:
            exchange_order_id = globals()['shopping_order_id'] + "_0"
            params = {'sub_order_id': exchange_order_id, 'goods_num': '1', 'goods_total_price': '2660.00', 'reason': '30天无理由换货', 'remarks': '哈哈', 'type': '2',
                      'goods_list': '[{"num":1,"sku_id":"4997","sku_name":"男士塑身背心","sku_detail":"黑色 76","tiaoma":"M316J232B0176","kuanhao":"M316J232","danjia":"2660.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010526413875910.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 # 验证值
                              , 0 # M216C237C0458门店库存
                              , 0 # M216C237C0464门店库存
                              , 0 # M116E248B0158门店库存
                              , 0 # M116E248B0164门店库存
                              , 1 # M316J232B01106门店库存
                              , -1 # M316J232B0176门店库存
                              , 0 # ZH02B215190T796242门店库存
                              , 0 # 门店到店次数期待增加值
                              , 0 # 门店新增会员数期待增加值
                              , 1 # 门店订单数期待增加值
                              , 0 # 门店退单数期待增加值
                              , 0 # 门店销售总额期待增加值
                              , 0 # 门店平台销售总额期待增加值
                              )
            # 验证数据
            self._data_assertion()
 def test_2_ChargeSimpleAndComplex_Exchange_part(self):
     """
    组合商品与普通商品余额方式门店混合
    普通商品腰背夹’:M216C237C0458 2件换货58换64
     :return:
     """
     logging.debug("test_2_ChargeSimpleAndComplex_Exchange_part")
     if globals()['shopping_order_id'] is not None:
         exchange_order_id = globals()['shopping_order_id'] + "_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  # 总揽订单数
                           , 1  # 总揽退单数
                           , 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()
Exemple #3
0
    def test_2_changer_10pieces(self):
        """
        换货10件商品数据
        腰背夹M216C237,深蓝色,58 换10个 腰背夹M216C237C0464, 深蓝色,64
        :return:
        """
        logging.debug("test_2_changer_10pieces")
        if globals()['shopping_order_id'] is not None:
            exchange_order_id = globals()['shopping_order_id'] + "_0"
            params = {
                'sub_order_id':
                exchange_order_id,
                'goods_num':
                '10',
                'goods_total_price':
                '31096.00',
                'reason':
                '尺码不合适',
                'remarks':
                '换货',
                'type':
                '2',
                'goods_type':
                '1',
                'goods_list':
                '[{"num":10,"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(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  # 验证值
                ,
                10  # M216C237C0458门店库存
                ,
                -10  # M216C237C0464门店库存
                ,
                0  # M116E248B0158门店库存
                ,
                0  # M116E248B0164门店库存
                ,
                0  # M316J232B01106门店库存
                ,
                0  # M316J232B0176门店库存
                ,
                0  # ZH02B215190T796242门店库存
                ,
                0  # 门店到店次数期待增加值
                ,
                0  # 门店新增会员数期待增加值
                ,
                1  # 门店订单数期待增加值
                ,
                0  # 门店退单数期待增加值
                ,
                0  # 门店销售总额期待增加值
                ,
                0  # 门店平台销售总额期待增加值
            )
            # 验证数据
            self._data_assertion()
Exemple #4
0
 def test_3_changer_pieces(self):
     """
     换货预售商品
     YS5130N748574
     深蓝色58 黑色58 换 深蓝色64 黑色64
     :return:
     """
     logging.debug("test_3_changer_10pieces")
     if globals()['order_id'] is not None:
         exchange_order_id = globals()['order_id'] + "_1"
         params = {
             'sub_order_id':
             exchange_order_id,
             'goods_num':
             '1',
             'goods_total_price':
             '0.00',
             'reason':
             '30天无理由换货',
             'remarks':
             '测试',
             'type':
             '2',
             'goods_type':
             '3',
             'goods_list':
             '[{"num":"1","sku_id":"6430","sku_name":"周自动化测试勿动","sku_detail":"","tiaoma":"YS5130N748574","kuanhao":"","danjia":"1000.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019112610521983674.jpg"}]',
             'sub_goods_list':
             '{"YS5130N748574":[{"num":1,"sku_id":"4702","sku_name":"包臀内裤","sku_detail":"黑色 64","tiaoma":"M116E248B0164","kuanhao":"M116E248","danjia":"0.01","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010568310459721.jpg","repo_num":488},{"num":1,"sku_id":"4879","sku_name":"腰背夹","sku_detail":"深蓝色 64","tiaoma":"M216C237C0464","kuanhao":"M216C237","danjia":"0.01","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg","repo_num":338}]}'
         }
         market_service.exchange_order(params)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         self._test_data_re.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  # 验证值
             ,
             1  # M216C237C0458门店库存
             ,
             -1  # M216C237C0464门店库存
             ,
             1  # M116E248B0158门店库存
             ,
             -1  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             1  # 门店订单数期待增加值
             ,
             0  # 门店退单数期待增加值
             ,
             0  # 门店销售总额期待增加值
             ,
             0  # 门店平台销售总额期待增加值
         )
         # 封装验证值
         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_2_ChargePreSaleGoods_Exchange_part(self):
     """
    预售商品换货
     :return:
     """
     pass
     logging.debug("test_2_ChargePreSaleGoods_Exchange_part")
     if globals()['order_shopping_id'] is not None:
         exchange_order_id = globals()['order_shopping_id'] + "_1"
         recharge_param = {
             'sub_order_id':
             exchange_order_id,
             'goods_num':
             '1',
             'goods_total_price':
             '0.00',
             'reason':
             '30天无理由换货',
             'remarks':
             '哈哈',
             'type':
             '2',
             'goods_type':
             '3',
             'goods_list':
             '[{"num":"1","sku_id":"6434","sku_name":"何明锐预售","sku_detail":"","tiaoma":"YS6789N838655","kuanhao":"","danjia":"1234.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019112758736210149.png"}]',
             'sub_goods_list':
             '{"YS6789N838655":[{"num":1,"sku_id":"4702","sku_name":"包臀内裤","sku_detail":"黑色 64","tiaoma":"M116E248B0164","kuanhao":"M116E248","danjia":"1.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010568310459721.jpg","repo_num":147},{"num":1,"sku_id":"4879","sku_name":"腰背夹","sku_detail":"深蓝色 64","tiaoma":"M216C237C0464","kuanhao":"M216C237","danjia":"1.00","img":"https://lchapp.oss-cn-beijing.aliyuncs.com/2019010579241063815.jpg","repo_num":196}]}'
         }
         market_service.exchange_order(recharge_param)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         self._test_data_re.update_post_verify_data()
         # 封装验证值
         self.expectedData(
             0  # 会员消费额
             ,
             0  # 会员积分
             ,
             2  # 会员卡等级
             ,
             0  # 会员余额
             ,
             0  # 总揽到店次数
             ,
             0  # 总揽新增会员数
             ,
             0  # 总揽订单数
             ,
             1  # 总揽退单数
             ,
             0  # 总揽销售总额
             ,
             0  # M216C237C0458总仓库存
             ,
             0  # M216C237C0464总仓库存
             ,
             0  # M116E248B0158总仓库存
             ,
             0  # M116E248B0164总仓库存
             ,
             0  # M316J232B01106总仓库存
             ,
             0  # M316J232B0176总仓库存
             ,
             0  # ZH02B215190T796242总仓库存
             ,
             0  # 验证值
             ,
             1  # M216C237C0458门店库存
             ,
             -1  # M216C237C0464门店库存
             ,
             1  # M116E248B0158门店库存
             ,
             -1  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             1  # 门店订单数期待增加值
             ,
             0  # 门店退单数期待增加值
             ,
             0  # 门店销售总额期待增加值
             ,
             0  # 门店平台销售总额期待增加值
         )
         # 封装验证值
         self._customer_re.expectedData = CustomerVerifyData.expected_data(
             0, 0, 0, 0)  # 更新转介绍会员验证值
         # 验证数据
         self._data_assertion()
         self._data_assertion_re()
Exemple #7
0
 def test_2_pos_Combination_and_common_exchange_part(self):
     """
     组合商品与普通商品pos订单,部分换货(普通商品)
     ‘腰背夹’:'深蓝色 58'换 "深蓝色 64"
     :return:
     """
     logging.debug("test_2_possskucombi_return_part")
     if globals()['shopping_order_id'] is not None:
         exchange_order_id = globals()['shopping_order_id'] + "_0"
         pos_param = {
             'sub_order_id':
             exchange_order_id,
             'goods_num':
             '1',
             'goods_total_price':
             '3244.80',
             'reason':
             '30天无理由换货',
             'remarks':
             '哈哈',
             'type':
             '2',
             'goods_list':
             '[{"num":1,"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(pos_param)
         # 更新充值后的验证数据
         self._test_data.update_post_verify_data()
         self._referral.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  # 验证值
             ,
             1  # M216C237C0458门店库存
             ,
             -1  # M216C237C0464门店库存
             ,
             0  # M116E248B0158门店库存
             ,
             0  # M116E248B0164门店库存
             ,
             0  # M316J232B01106门店库存
             ,
             0  # M316J232B0176门店库存
             ,
             0  # ZH02B215190T796242门店库存
             ,
             0  # 门店到店次数期待增加值
             ,
             0  # 门店新增会员数期待增加值
             ,
             1  # 门店订单数期待增加值
             ,
             0  # 门店退单数期待增加值
             ,
             0  # 门店销售总额期待增加值
             ,
             0  # 门店平台销售总额期待增加值
         )
         self._referral.expectedData = CustomerVerifyData.expected_data(
             0, 0, 5, 0)
         # 验证数据
         self._data_assertion()