fixes broken test cases with PhotoSize, Game and Animation classes#435
fixes broken test cases with PhotoSize, Game and Animation classes#435jh0ker merged 3 commits intopython-telegram-bot:october3from
Conversation
However: testSendGame and test_set_game_score both produces *BadRequest: u'Wrong file identifier/HTTP URL specified'*.
|
The @pythontelegrambottests is indeed not set up with games properly since I just tested locally with my own one. However, I'm hereby pinging @leandrotoledo about it. |
jh0ker
left a comment
There was a problem hiding this comment.
I left only one comment and I would love to hear your ideas on it. Cheers!
telegram/base.py
Outdated
| if value is not None: | ||
| if hasattr(value, 'to_dict'): | ||
| data[key] = value.to_dict() | ||
| if type(value) == list: |
There was a problem hiding this comment.
If I understand this part correctly, you added this to decode attributes that are marked as "Array of ..." in the API docs?
In case I assume correctly, we usually have a de_list method on classes like PhotoSize (Implementation and usage examples) when needed.
However, I do like your solution for this. Maybe it could be implemented in a separate PR, for all cases where it is needed.
There was a problem hiding this comment.
Update from a private chat: I was wrongfully thinking of de_json instead of to_dict, but the outcome is the same.
…n base.TelegramObject
|
Awesome! LGTM, merging |
However testSendGame and test_set_game_score both produce:
BadRequest: u'Wrong file identifier/HTTP URL specified
for the official @pythontelegrambottests test bot.
This is very probably the case because the test bot it not correctly configured to be a game.