Skip to content

Commit 3552945

Browse files
committed
fixes test
1 parent e2f4692 commit 3552945

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

services/web/server/src/simcore_service_webserver/wallets/_payments_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ async def _pay_with_payment_method(request: web.Request):
345345

346346
async def _notify_payment_completed_after_response(app, user_id, payment):
347347
# A small delay to send notification just after the response
348-
await asyncio.sleep(0.5)
348+
await asyncio.sleep(0.1)
349349
return (
350350
await notify_payment_completed(app, user_id=user_id, payment=payment),
351351
)

services/web/server/tests/unit/with_dbs/03/wallets/payments/test_payments_methods.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# pylint: disable=too-many-arguments
55

66

7+
import asyncio
78
from decimal import Decimal
89
from unittest.mock import MagicMock
910

@@ -376,7 +377,8 @@ async def test_one_time_payment_with_payment_method(
376377
assert mock_rut_add_credits_to_wallet.called
377378
mock_rut_add_credits_to_wallet.assert_called_once()
378379

379-
# check notification (fake)
380+
# check notification after response
381+
await asyncio.sleep(0.1)
380382
assert send_message.called
381383
send_message.assert_called_once()
382384

0 commit comments

Comments
 (0)