@@ -4,40 +4,39 @@ Unit-tests for `python-telegram-bot <https://github.com/python-telegram-bot/pyth
44How it works
55====================
66
7- **= This is a first version of library= **
7+ **This is a first version of library **
88
99Library starts your python-telegram-bot object with custom url (our unit-test server on Flask running under waitress).
1010Now you can communicate in unit-tests with your bot as you do in Telegram.
1111
12- ----
12+
1313Features
14- ----
14+ -------------------
1515
16161. send text message
17172. send command
1818
19- ----
19+
2020Fixtures
21- ----
21+ -------------------
2222
2323user
24- ----
24+ --------------------------
2525
2626User object to send messages and check incoming messages from your bot
2727
2828bot
29- ----
29+ --------------------------
30+ Your bot object. See 'Using'
3031
31- You bot object. See 'Using'
3232
3333
34- ----
3534Echo Bot example
36- ----
35+ --------------------------
3736
3837Check echo of Echo Bot from python-telegram-bot example.
3938
40- .. code :: python
39+ .. code ::
4140
4241 def test_echobot_message(bot, user):
4342 user.send_message('testing message')
@@ -47,7 +46,7 @@ Check echo of Echo Bot from python-telegram-bot example.
4746
4847 Check /start command of Echo Bot
4948
50- .. code :: python
49+ .. code ::
5150
5251 def test_echobot_start(bot, user):
5352 user.send_command('/start')
@@ -60,13 +59,13 @@ Installing
6059
6160You can install or upgrade telegram-bot-unittest with:
6261
63- .. code :: shell
62+ .. code ::
6463
6564 $ pip install telegram-bot-unittest --upgrade
6665
6766 Or you can install from source with:
6867
69- .. code :: shell
68+ .. code ::
7069
7170 $ git clone https://github.com/dontsovcmc/telegram-bot-unittest --recursive
7271 $ cd telegram-bot-unittest
79781. Create non-bloking function 'setup_bot' that runs your bot.
8079We need to separate updater.idle() and creating Updater().
8180
82- .. code :: python
81+ .. code ::
8382
8483 def setup_bot(bot_token: str, base_url: str = None) -> Updater:
8584
@@ -102,7 +101,7 @@ We need to separate updater.idle() and creating Updater().
102101
103102 2. Add fixture 'bot' to you fixture.py file. Example:
104103
105- .. code :: python
104+ .. code ::
106105
107106 import pytest
108107 from <your module> import <start_bot_function>
0 commit comments