mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
feat: implement logging throughout the application and enhance error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user