Examples ======== Here are some small examples to show how a developer can use ``PTBtest`` to write unit tests for a ``python-telegram-bot`` bot. All examples are licensed under the `CC0 License `__ and are therefore fully dedicated to the public domain. You can use them as the base for your own bots without worrying about copyrights. Contents -------- .. toctree:: :hidden: examples.test_echobot examples.test_timerbot examples.test_conversationbot2 examples.test_inlinebot examples.test_inlinekeyboard :any:`examples.test_echobot` ---------------------------- This is the base example of how to use PTBtest to write unit tests for your ``python-telegram-bot``. It is based on `echobot `__ which simply replies to each text message with a message that contains the same text. :any:`examples.test_timerbot` ----------------------------- This example follows the timerbot example at: `timerbot `__. We will skip the start and help handlers and focus on the timer. :any:`examples.test_conversationbot2` ------------------------------------- :any:`examples.test_inlinebot` ------------------------------ :any:`examples.test_inlinekeyboard` -----------------------------------