Lines Matching full:upload

213     upload = MediaFileUpload(datafile('small.png'))
214 self.assertEqual('image/png', upload.mimetype())
216 upload = MediaFileUpload(datafile('empty'))
217 self.assertEqual('application/octet-stream', upload.mimetype())
220 upload = MediaFileUpload(
222 self.assertEqual('image/png', upload.mimetype())
223 self.assertEqual(190, upload.size())
224 self.assertEqual(True, upload.resumable())
225 self.assertEqual(500, upload.chunksize())
226 self.assertEqual(b'PNG', upload.getbytes(1, 3))
228 json = upload.to_json()
284 upload = MediaIoBaseUpload(
286 self.assertEqual('image/png', upload.mimetype())
287 self.assertEqual(190, upload.size())
288 self.assertEqual(True, upload.resumable())
289 self.assertEqual(500, upload.chunksize())
290 self.assertEqual(b'PNG', upload.getbytes(1, 3))
294 upload = MediaIoBaseUpload(
296 self.assertEqual('image/png', upload.mimetype())
297 self.assertEqual(190, upload.size())
298 self.assertEqual(True, upload.resumable())
299 self.assertEqual(500, upload.chunksize())
300 self.assertEqual(b'PNG', upload.getbytes(1, 3))
305 upload = MediaIoBaseUpload(fd=f, mimetype='image/png')
308 json = upload.to_json()
319 upload = MediaIoBaseUpload(
321 self.assertEqual('image/png', upload.mimetype())
322 self.assertEqual(190, upload.size())
323 self.assertEqual(True, upload.resumable())
324 self.assertEqual(500, upload.chunksize())
325 self.assertEqual(b'PNG', upload.getbytes(1, 3))
331 upload = MediaIoBaseUpload(
333 self.assertEqual('image/png', upload.mimetype())
334 self.assertEqual(190, upload.size())
335 self.assertEqual(True, upload.resumable())
336 self.assertEqual(500, upload.chunksize())
337 self.assertEqual(b'PNG', upload.getbytes(1, 3))
347 upload = MediaIoBaseUpload(
349 self.assertEqual(True, upload.has_stream())
350 self.assertEqual(fd, upload.stream())
355 upload = MediaIoBaseUpload(
358 # Simulate errors for both the request that creates the resumable upload
359 # and the upload itself.
372 uri = u'https://www.googleapis.com/someapi/v1/upload/?foo=bar'
380 resumable=upload)
391 upload = MediaIoBaseUpload(
400 uri = u'https://www.googleapis.com/someapi/v1/upload/?foo=bar'
408 resumable=upload)
854 uri = u'https://www.googleapis.com/someapi/v1/upload/?foo=bar'
891 upload = MediaIoBaseUpload(fd=small_png_fd, mimetype='image/png',
901 resumable=upload)
1213 upload = MediaFileUpload(
1215 self.request1.resumable = upload