test: 为内存积分服务添加获取余额的模拟方法

添加 get_balance 方法到 _InMemoryPointsService 模拟类中,以便在测试中能够模拟查询用户余额的操作。
This commit is contained in:
2026-04-07 20:22:48 +08:00
parent 9895256064
commit d1871d3919

View File

@@ -190,6 +190,10 @@ class _InMemoryPointsService:
self.calls.append(("refund_bet_points", {"user_id": user_id, "amount": amount, "reason": reason}))
return True, 0
async def get_balance(self, user_id: str) -> int:
self.calls.append(("get_balance", {"user_id": user_id}))
return 0
class _NoopMessageService:
def clear_pending_recalls(self, scope: str):