[perf] pending payments check (#3565)
Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
parent
33e2fc2ea8
commit
0910687328
8 changed files with 74 additions and 30 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue