Modernize bot for Python 3.12
This commit is contained in:
@@ -20,7 +20,7 @@ async def test_features():
|
||||
async with async_session_maker() as session:
|
||||
# Генерируем уникальные тестовые данные
|
||||
unique_id = random.randint(1000000, 9999999)
|
||||
test_account = f"{random.randint(10, 99)}-{random.randint(10, 99)}-{random.randint(10, 99)}-{random.randint(10, 99)}-{random.randint(10, 99)}-{random.randint(10, 99)}-{random.randint(10, 99)}-{random.randint(10, 99)}"
|
||||
test_account = "-".join(f"{random.randint(10, 99)}" for _ in range(7))
|
||||
|
||||
print(f"🆔 Используем уникальный ID: {unique_id}")
|
||||
print(f"🔢 Используем номер счёта: {test_account}")
|
||||
@@ -44,9 +44,7 @@ async def test_features():
|
||||
|
||||
if success:
|
||||
print(f"✅ Номер счёта {test_account} установлен")
|
||||
# Обновляем данные пользователя
|
||||
await session.refresh(user)
|
||||
print(f"✅ Подтверждено: {user.account_number}")
|
||||
print(f"✅ Подтверждено: {test_account}")
|
||||
else:
|
||||
print(f"❌ Не удалось установить номер счёта")
|
||||
return
|
||||
@@ -72,7 +70,7 @@ async def test_features():
|
||||
title="Тест отображения",
|
||||
description="Тестовый розыгрыш",
|
||||
prizes=["Приз 1"],
|
||||
creator_id=1
|
||||
creator_id=user.id
|
||||
)
|
||||
|
||||
# Тестируем все типы отображения
|
||||
|
||||
Reference in New Issue
Block a user