Require club cards in cashier enrollment and restore ticket owners
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-09-14 21:30:38 +09:00
parent 9b19b82caf
commit 8d4baeb720
10 changed files with 258 additions and 23 deletions

View File

@@ -101,12 +101,12 @@ async def test_duplicate_account_reports_and_finishes_dialog(route, caplog):
await send(callback="account_action:add_to_lottery")
calls = await send(callback=f"add_accounts_to:{lottery_id}")
elif route == "command":
await context(actor).update_data(accounts=[{"account_number": ACCOUNT}])
await context(actor).update_data(accounts=[{"club_card": "0007", "account_number": ACCOUNT}])
calls = await send(callback=f"add_to_lottery_{lottery_id}")
elif route == "cashier":
await send(actor, text="/cashier")
await send(actor, callback=f"cash_add:{lottery_id}")
calls = await send(actor, text=ACCOUNT)
calls = await send(actor, text=f"0007 {ACCOUNT}")
else:
await send(callback=f"admin_bulk_add_accounts_to_{lottery_id}")
calls = await send(text=ACCOUNT)
@@ -182,7 +182,7 @@ async def test_two_cashiers_share_draw_without_duplicate_tickets(caplog):
await session.commit()
for actor in (900002, 960002):
await send(actor, callback=f"cash_add:{lottery_id}")
calls = await asyncio.gather(send(900002, text=ACCOUNT), send(960002, text=ACCOUNT), send(CLIENT, text="/start"))
calls = await asyncio.gather(send(900002, text=f"0007 {ACCOUNT}"), send(960002, text=f"0007 {ACCOUNT}"), send(CLIENT, text="/start"))
assert_clean(caplog)
assert sum("Добавлено: 1" in output(result) for result in calls) == 1
async with async_session_maker() as session: