test: 为内存积分服务添加获取余额的模拟方法
添加 get_balance 方法到 _InMemoryPointsService 模拟类中,以便在测试中能够模拟查询用户余额的操作。
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user