From 512ca2643fef17a2685ae5b1b8b7f7e3b9ab3562 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 15:40:43 +0200 Subject: [PATCH] Fix weird import in phototest --- tests/test_photo.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_photo.py b/tests/test_photo.py index 81c9e88a9..a70abb77a 100644 --- a/tests/test_photo.py +++ b/tests/test_photo.py @@ -127,16 +127,15 @@ class PhotoTest(BaseTest, unittest.TestCase): @flaky(3, 1) @timeout(10) def test_send_photo_bytesio_jpg_file(self): - from telegram.inputfile import InputFile # raw image bytes raw_bytes = BytesIO(open(self.photo_bytes_jpg_no_standard, 'rb').read()) - inputfile = InputFile({"photo": raw_bytes}) + inputfile = telegram.InputFile({"photo": raw_bytes}) self.assertEqual(inputfile.mimetype, 'application/octet-stream') # raw image bytes with name info raw_bytes = BytesIO(open(self.photo_bytes_jpg_no_standard, 'rb').read()) raw_bytes.name = self.photo_bytes_jpg_no_standard - inputfile = InputFile({"photo": raw_bytes}) + inputfile = telegram.InputFile({"photo": raw_bytes}) self.assertEqual(inputfile.mimetype, 'image/jpeg') # send raw photo