fix: 修复打手详情响应字段

This commit is contained in:
zetaloop
2026-04-25 08:30:30 +08:00
parent d686a7a32c
commit 848827482f
3 changed files with 96 additions and 9 deletions
+19 -1
View File
@@ -791,7 +791,12 @@ def phase6_player(s: Session, game_id):
report(f"GET /players/{player_id}", code, body)
report_check(
f"GET /players/{player_id} returns initialized online player",
code == 200 and same_id(body.get("id"), player_id) and body.get("status") == "online",
code == 200
and same_id(body.get("id"), player_id)
and body.get("status") == "online"
and body.get("gender") is True
and as_int((body.get("user") or {}).get("id")) > 0
and isinstance(body.get("services"), list),
body,
)
@@ -860,6 +865,19 @@ def phase6_player(s: Session, game_id):
body,
)
code, body, _ = s.get(f"{GATEWAY}/api/v1/players/{player_id}")
report(f"GET /players/{player_id} (after service update)", code, body)
service = find_item_by_id(body.get("services") or [], service_id)
report_check(
f"GET /players/{player_id} includes updated service",
code == 200
and body.get("gender") is True
and bool(service)
and service.get("title") == "Updated Service"
and as_decimal(service.get("price")) == Decimal("60"),
body,
)
if player_id:
code, body, _ = s.get(f"{GATEWAY}/api/v1/players/{player_id}/services")
report(f"GET /players/{player_id}/services", code, body)