ptbtest icon indicating copy to clipboard operation
ptbtest copied to clipboard

Adapting code to python-telegram-bot 8.1.1

Open lucaspg96 opened this issue 8 years ago • 2 comments

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.

lucaspg96 avatar Nov 08 '17 16:11 lucaspg96

Codecov Report

Merging #17 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update 8d5fee3...652150e. Read the comment docs.

codecov[bot] avatar Nov 08 '17 16:11 codecov[bot]

Hi. I'm notifying everyone who PRed to this repo about #21.

Bibo-Joshi avatar Jan 23 '22 16:01 Bibo-Joshi