Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Jun 25, 2024
1 parent bbf08b6 commit 083d427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cashu/mint/events/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def start(self):

# Handle the request
try:
logger.debug(f"Request: {req}")
logger.debug(f"Request: {req.json()}")
resp = await self._handle_request(req)
# Send the response
await self._send_msg(resp)
Expand Down Expand Up @@ -166,7 +166,7 @@ async def _send_obj(self, data: dict, subId: str):
async def _send_msg(
self, data: Union[JSONRPCResponse, JSONRPCNotification, JSONRPCErrorResponse]
):
logger.debug(f"Sending websocket message: {data}")
logger.debug(f"Sending websocket message: {data.json()}")
await self.websocket.send_text(data.json())

def add_subscription(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_wallet_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def callback(msg: JSONRPCNotficationParams):
assert triggered
# assert len(msg_stack) == 1

assert msg_stack[1].payload["paid"] is False
assert msg_stack[1].payload["issued"] is False
assert msg_stack[0].payload["paid"] is False
assert msg_stack[0].payload["issued"] is False

assert msg_stack[1].payload["paid"] is True
assert msg_stack[1].payload["issued"] is False
Expand Down

0 comments on commit 083d427

Please sign in to comment.