Skip to content

Commit 512ca26

Browse files
committed
Fix weird import in phototest
1 parent 4b53ed1 commit 512ca26

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_photo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,15 @@ def test_send_photo_url_jpg_file(self):
127127
@flaky(3, 1)
128128
@timeout(10)
129129
def test_send_photo_bytesio_jpg_file(self):
130-
from telegram.inputfile import InputFile
131130
# raw image bytes
132131
raw_bytes = BytesIO(open(self.photo_bytes_jpg_no_standard, 'rb').read())
133-
inputfile = InputFile({"photo": raw_bytes})
132+
inputfile = telegram.InputFile({"photo": raw_bytes})
134133
self.assertEqual(inputfile.mimetype, 'application/octet-stream')
135134

136135
# raw image bytes with name info
137136
raw_bytes = BytesIO(open(self.photo_bytes_jpg_no_standard, 'rb').read())
138137
raw_bytes.name = self.photo_bytes_jpg_no_standard
139-
inputfile = InputFile({"photo": raw_bytes})
138+
inputfile = telegram.InputFile({"photo": raw_bytes})
140139
self.assertEqual(inputfile.mimetype, 'image/jpeg')
141140

142141
# send raw photo

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy