File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def de_json(data):
62
62
from_user = None
63
63
64
64
if 'chat' in data :
65
- if 'username' in data [ 'chat' ] or 'id ' in data ['chat' ]:
65
+ if 'first_name ' in data ['chat' ]:
66
66
from telegram import User
67
67
chat = User .de_json (data ['chat' ])
68
68
if 'title' in data ['chat' ]:
Original file line number Diff line number Diff line change @@ -49,14 +49,14 @@ def testSendPhoto(self):
49
49
print 'Testing sendPhoto - File'
50
50
message = self ._bot .sendPhoto (photo = open ('tests/telegram.png' , 'rb' ),
51
51
chat_id = 12173560 )
52
- self .assertEqual (12948 , message .photo [2 ].file_size )
52
+ self .assertEqual (1451 , message .photo [0 ].file_size )
53
53
54
54
def testResendPhoto (self ):
55
55
'''Test the telegram.Bot sendPhoto method'''
56
56
print 'Testing sendPhoto - Resend'
57
- message = self ._bot .sendPhoto (photo = str ('AgAD_v___6-nMRs1PC0HuqtHTCQ9qx0AFAI ' ),
57
+ message = self ._bot .sendPhoto (photo = str ('AgADAQADr6cxGzU8LQe6q0dMJD2rHYkP2ykABFymiQqJgjxRGGMAAgI ' ),
58
58
chat_id = 12173560 )
59
- self .assertEqual (u'AgAD_v___6-nMRs1PC0HuqtHTCQ9qx0AFAI ' , message .photo [2 ].file_id )
59
+ self .assertEqual (u'AgADAQADr6cxGzU8LQe6q0dMJD2rHYkP2ykABFymiQqJgjxRGGMAAgI ' , message .photo [0 ].file_id )
60
60
61
61
def testSendAudio (self ):
62
62
'''Test the telegram.Bot sendAudio method'''
You can’t perform that action at this time.
0 commit comments