Tishka17 / aiogram_dialog

GUI framework on top of aiogram
https://aiogram-dialog.readthedocs.io
Apache License 2.0
661 stars 103 forks source link

Test_tools exploitation notes #228

Open bomzheg opened 1 year ago

bomzheg commented 1 year ago
  1. I need to put more user and chat args into BotClient object. Now I use that workaround:
    client = BotClient(dp)
    client.user = User(...)
    client.chat = Chat(...)
  2. for bot command testcases it will be usefull to put BotCommand objects into BotClient.send()
    FOO_COMMAND = BotCommand("foo", "my awesome command for usefull actions")
    # Now
    client.send("/" + FOO_COMMAND.command)
    # Suggestion
    client.send(FOO_COMMAND)
bomzheg commented 1 year ago

For history. Discussion about note 1 was here: https://t.me/aiogram_dialog/30299 and about note 2 was here: https://t.me/aiogram_dialog/30363

Tishka17 commented 1 year ago