Adapting code to python-telegram-bot 8.1.1
There were only 2 problems on the lib:
- First, the Mockbot must to have a "request" attribute. The value is an object telegram.util.request.Request;
- Second, the User constructor from telegram.User needs a new argument: is_bot. This values defines if the user is a bot or not. When using inside the Mockbot, I set this value to True. On the usergenerator class, I added this variable and set as default False.
I don't know exactly how Travis works, but, to execute the tests here, I need to change the system path on each test class. I made this modifications, but you can change if necessary.
If is everything ok, can you release this lib? I need it on a application that I'm building.
Codecov Report
Merging #17 into master will increase coverage by
<.01%. The diff coverage is100%.
@@ Coverage Diff @@
## master #17 +/- ##
==========================================
+ Coverage 99.68% 99.68% +<.01%
==========================================
Files 11 11
Lines 939 941 +2
==========================================
+ Hits 936 938 +2
Misses 3 3
| Impacted Files | Coverage Δ | |
|---|---|---|
| ptbtest/usergenerator.py | 100% <ø> (ø) |
:arrow_up: |
| ptbtest/mockbot.py | 99.48% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 8d5fee3...652150e. Read the comment docs.
Hi. I'm notifying everyone who PRed to this repo about #21.