Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test_tools exploitation notes #228

Open
bomzheg opened this issue Jan 22, 2023 · 2 comments
Open

Test_tools exploitation notes #228

bomzheg opened this issue Jan 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bomzheg
Copy link
Contributor

bomzheg commented Jan 22, 2023

  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(...)
  1. 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 bomzheg changed the title Test explatation notes Test_tools expluatation notes Jan 22, 2023
@bomzheg bomzheg changed the title Test_tools expluatation notes Test_tools exploitation notes Jan 22, 2023
@bomzheg
Copy link
Contributor Author

bomzheg commented Jan 23, 2023

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
Copy link
Owner

  • context manager instead (in addition to) .reset_history
  • start dialog and get result

@Tishka17 Tishka17 added the enhancement New feature or request label Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants