feat: implement logging throughout the application and enhance error handling

This commit is contained in:
bohd4nx
2026-05-29 00:58:00 +03:00
parent e9dd706fa6
commit 546bcb337c
15 changed files with 321 additions and 41 deletions
+3 -1
View File
@@ -165,6 +165,7 @@ async def test_giveaway_stars_success(client: FragmentClient) -> None:
AsyncMock(
side_effect=[
{"found": {"recipient": FAKE_RECIPIENT}},
{},
{"req_id": FAKE_REQ_ID},
FAKE_TRANSACTION,
]
@@ -187,6 +188,7 @@ async def test_giveaway_stars_passes_payment_method(client: FragmentClient) -> N
call_mock = AsyncMock(
side_effect=[
{"found": {"recipient": FAKE_RECIPIENT}},
{},
{"req_id": FAKE_REQ_ID},
FAKE_TRANSACTION,
]
@@ -199,7 +201,7 @@ async def test_giveaway_stars_passes_payment_method(client: FragmentClient) -> N
):
await client.giveaway_stars("@channel", winners=3, amount=1000, payment_method="usdt_ton")
init_call = call_mock.await_args_list[1]
init_call = call_mock.await_args_list[2]
assert init_call.args[0] == "initGiveawayStarsRequest"
assert init_call.args[1]["payment_method"] == "usdt_ton"
assert proc_mock.await_args is not None