Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: tools/telemetry/third_party/gsutilz/third_party/apitools/samples/storage_sample/uploads_test.py

Issue 1376593003: Roll gsutil version to 4.15. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/third_party/gsutilz/third_party/apitools/samples/storage_sample/uploads_test.py
diff --git a/tools/telemetry/third_party/gsutilz/third_party/apitools/samples/storage_sample/uploads_test.py b/tools/telemetry/third_party/gsutilz/third_party/apitools/samples/storage_sample/uploads_test.py
index ad4416f60748a789723ae36b37006400f7035e8d..4eb5abad37d4b67a2570ce425e98f9ec37c65d1e 100644
--- a/tools/telemetry/third_party/gsutilz/third_party/apitools/samples/storage_sample/uploads_test.py
+++ b/tools/telemetry/third_party/gsutilz/third_party/apitools/samples/storage_sample/uploads_test.py
@@ -103,6 +103,20 @@ class UploadsTest(unittest.TestCase):
response = self.__InsertFile(filename, request=request)
self.assertEqual(size, response.size)
+ def testStreamMedia(self):
+ filename = 'ten_meg_file'
+ size = 10 << 20
+ self.__ResetUpload(size, auto_transfer=False)
+ self.__upload.strategy = 'resumable'
+ self.__upload.total_size = size
+ request = self.__InsertRequest(filename)
+ initial_response = self.__client.objects.Insert(
+ request, upload=self.__upload)
+ self.assertIsNotNone(initial_response)
+ self.assertEqual(0, self.__buffer.tell())
+ self.__upload.StreamMedia()
+ self.assertEqual(size, self.__buffer.tell())
+
def testBreakAndResumeUpload(self):
filename = ('ten_meg_file_' +
''.join(random.sample(string.ascii_letters, 5)))

Powered by Google App Engine
This is Rietveld 408576698