ro = RecycleOrder()
def set_shop(shop_id,shopType):
def decorator(func):
def wrapper(*args, **kwargs):
ro.set_shop(shop_id=shop_ip, shopType=shopType)
result = func(*args,**kwargs)
return result
return wrapper
return decorator
class TestOrder():
@set_shop(16630,1)
def test_shop_recycle_order(self):
"""
下单
:return:
"""
for i in range(1):
# ro.set_shop(shop_id=16630,shopType=1) #替代此条
res = ro.recycle_order(pay=True)
print("订单号:", res)
07-13
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-19
1162
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-17