Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapting code to python-telegram-bot 8.1.1 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucaspg96
Copy link

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
Copy link

codecov bot commented Nov 8, 2017

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% <ø> (ø) ⬆️
ptbtest/mockbot.py 99.48% <100%> (ø) ⬆️

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.

@Bibo-Joshi
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants