M
M
mrozhentsev2020-11-12 11:57:44
Python
mrozhentsev, 2020-11-12 11:57:44

How to implement unit tests for a bot in Telegram?

I write bots with complex logic and any change in the code requires tests. Manual testing takes a lot of time, I would like to somehow automate it using unittest in python.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-11-12
@bacon

Separate the logic of interaction with telegrams and business logic, i.e. she should be able to work without telegrams. And test this business logic separately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question