接入虎牙精英宝典最新商城前置流程
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
from core.huya.activity_structs import ActPrizeDetailItem, GetActPrizeDetailResp
|
||||
from core.huya.http_client import SHOP_BIZ_UA, HuyaHttpClient
|
||||
from core.huya.shop_structs import OrderDetailData, OrderDetailOrder, OrderDetailRsp
|
||||
from core.huya.shop_structs import (
|
||||
ListPayChannelRsp,
|
||||
OrderDetailData,
|
||||
OrderDetailOrder,
|
||||
OrderDetailRsp,
|
||||
ShopCodeRsp,
|
||||
)
|
||||
from core.huya.taf_protocol import TafInputStream, TafOutputStream, TafType
|
||||
|
||||
|
||||
@@ -66,3 +72,18 @@ def test_order_detail_round_trip_exposes_payment_status():
|
||||
assert decoded.order.orderId == 10938643
|
||||
assert decoded.order.orderStatus == 50
|
||||
assert decoded.order.payTime > 0
|
||||
|
||||
|
||||
def test_shop_preflight_response_contracts():
|
||||
channels = ListPayChannelRsp()
|
||||
channels.channels = ["Zfb", "Weixin"]
|
||||
channels.code = 200
|
||||
decoded_channels = _round_trip(channels)
|
||||
assert decoded_channels.channels == ["Zfb", "Weixin"]
|
||||
assert decoded_channels.code == 200
|
||||
|
||||
status = ShopCodeRsp()
|
||||
status.code = 200
|
||||
status.message = ""
|
||||
decoded_status = _round_trip(status)
|
||||
assert decoded_status.code == 200
|
||||
|
||||
Reference in New Issue
Block a user