mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Adding new code-generator (Butcher) (#1069)
* Re-generate types * Re-generate methods (only attributes) * Added enums * Base init generator * Added butcher configs * Fixed tests, bump butcher * Added changelog * Added enum docs * Added templates for docs index * Re-generate bot class, remove deprecated methods
This commit is contained in:
parent
c7779abc50
commit
d034c1ba9f
387 changed files with 32036 additions and 3144 deletions
|
|
@ -8,6 +8,7 @@ import pytest
|
|||
from aiogram import Bot
|
||||
from aiogram.client.session.base import BaseSession, TelegramType
|
||||
from aiogram.client.telegram import PRODUCTION, TelegramAPIServer
|
||||
from aiogram.enums import ChatType, TopicIconColor
|
||||
from aiogram.exceptions import (
|
||||
ClientDecodeError,
|
||||
RestartingTelegram,
|
||||
|
|
@ -91,6 +92,8 @@ class TestBaseSession:
|
|||
assert session.prepare_value(now) == str(round(now.timestamp()))
|
||||
assert isinstance(session.prepare_value(datetime.timedelta(minutes=2)), str)
|
||||
assert session.prepare_value(42) == "42"
|
||||
assert session.prepare_value(ChatType.PRIVATE) == "private"
|
||||
assert session.prepare_value(TopicIconColor.RED) == "16478047"
|
||||
|
||||
def test_clean_json(self):
|
||||
session = CustomSession()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue