Conversation
* Changed to new method of non-static file_id * removed obsolete tests.
* Changed to new method of non-static file_id * removed obsolete tests.
* Changed to new method of non-static file_id * removed obsolete tests.
Clean setUpClass + add assertions remove obsolete tests add test_expected_values
Py2 does not implement TestCase's assertions until setUp() is done. Hence we need simple assertions in the setUpClass
* Changed to new method of non-static file_id * removed obsolete tests.
* Changed to new method of non-static file_id * removed obsolete tests.
* Changed to new method of non-static file_id * removed obsolete tests. * changed some tests in all file
It now decides wich bot to give depending on CI, and made ready or more bot's per version.
* Audiofile sent from web is shorter then from local * web-photo's send more than two imagesizes
|
Ok, right now I expect the test_audio to throw an exception that should be fixed if the new audio-file is on master. Besides that I think this is about ready to merge |
|
Re: Travis: |
* cleanup assertions in test_video * modify test_sticker to same standard as the others.
* Added telegram.jpg to gitignore since we're downloading it now * moved download tests to the right tests to make test_file file_id free
|
Ok so I think it's about done now. |
|
On travis only expected tests failed. |
| c = telegram.File(self.audio_file_id, None) | ||
| d = telegram.File(self.document_file_id, self._bot) | ||
| e = telegram.Voice(self.audio_file_id, 0) | ||
| a = telegram.File("DOESNTMATTER", self._bot) |
There was a problem hiding this comment.
Technically they do matter here. But it's fine :)
| @timeout(10) | ||
| def test_send_photo_url_png_file(self): | ||
| message = self._bot.sendPhoto( | ||
| photo='http://dummyimage.com/600x400/000/fff.png&text=telegram', chat_id=self._chat_id) |
There was a problem hiding this comment.
Could we maybe use a photo in our github here? Not a fan of depending on external sites (anymore than we already do)
| @timeout(10) | ||
| def test_send_photo_url_gif_file(self): | ||
| message = self._bot.sendPhoto( | ||
| photo='http://dummyimage.com/600x400/000/fff.png&text=telegram', chat_id=self._chat_id) |
| self.file_size = 39518 | ||
| @classmethod | ||
| def setUpClass(cls): | ||
| cls.emoji = telegram.Emoji.FLEXED_BICEPS |
There was a problem hiding this comment.
Please don't use the Emoji module as it's deprecated
| self.assertEqual(voice.duration, self.duration) | ||
| self.assertEqual(voice.mime_type, self.mime_type) | ||
| self.assertEqual(voice.file_size, self.file_size) | ||
| self.assertTrue(os.path.isfile('telegram.ogg')) |
There was a problem hiding this comment.
(applies to all downloads)
Should we check against the local file, that they're the same?
|
Merged according to discussion in the developers group. |
Please do not merge, I want to see what travis thinks of this changes