Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/tgbot/test_create_or_update_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ async def test_create_or_update_user_reports_created_and_unblocks():
assert created is True and row["id"] == 90501 and row["type"] == "user"

async with engine.begin() as conn:
await conn.execute(user.update().where(user.c.id == 90501).values(type="blocked_bot", blocked_bot_at=func.now()))
await conn.execute(
user.update()
.where(user.c.id == 90501)
.values(type="blocked_bot", blocked_bot_at=func.now())
)
row, created = await create_or_update_user(id=90501)
assert created is False and row["type"] == "user" and row["blocked_bot_at"] is None
finally:
Expand Down