[perf] pending payments check (#3565)

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Vlad Stan 2025-11-25 14:09:57 +02:00 committed by GitHub
parent 33e2fc2ea8
commit 0910687328
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 74 additions and 30 deletions

View file

@ -418,9 +418,22 @@ async def test_get_payments_paginated(client, inkey_fresh_headers_to, fake_payme
)
assert response.status_code == 200
paginated = response.json()
assert len(paginated["data"]) == 2
data = paginated["data"]
assert len(data) == 2
assert paginated["total"] == len(fake_data)
checking_id_list = [payment["checking_id"] for payment in data]
params = {"checking_id[in]": ",".join(checking_id_list)}
response = await client.get(
"/api/v1/payments/paginated",
params=params,
headers=inkey_fresh_headers_to,
)
data = response.json()["data"]
assert len(data) == 2
for payment in data:
assert payment["checking_id"] in checking_id_list
@pytest.mark.anyio
async def test_get_payments_history(client, inkey_fresh_headers_to, fake_payments):