@@ -323,7 +323,8 @@ def test_upload_from_file_simple(self):
323323 with NamedTemporaryFile () as fh :
324324 fh .write (DATA )
325325 fh .flush ()
326- blob .upload_from_file (fh , rewind = True )
326+ found = blob .upload_from_file (fh , rewind = True )
327+ self .assertTrue (found is blob )
327328 rq = connection .http ._requested
328329 self .assertEqual (len (rq ), 1 )
329330 self .assertEqual (rq [0 ]['method' ], 'POST' )
@@ -367,7 +368,8 @@ def test_upload_from_file_resumable(self):
367368 with NamedTemporaryFile () as fh :
368369 fh .write (DATA )
369370 fh .flush ()
370- blob .upload_from_file (fh , rewind = True )
371+ found = blob .upload_from_file (fh , rewind = True )
372+ self .assertTrue (found is blob )
371373 rq = connection .http ._requested
372374 self .assertEqual (len (rq ), 3 )
373375 self .assertEqual (rq [0 ]['method' ], 'POST' )
@@ -422,7 +424,8 @@ def test_upload_from_file_w_slash_in_name(self):
422424 with NamedTemporaryFile () as fh :
423425 fh .write (DATA )
424426 fh .flush ()
425- blob .upload_from_file (fh , rewind = True )
427+ found = blob .upload_from_file (fh , rewind = True )
428+ self .assertTrue (found is blob )
426429 rq = connection .http ._requested
427430 self .assertEqual (len (rq ), 1 )
428431 self .assertEqual (rq [0 ]['method' ], 'POST' )
@@ -462,7 +465,8 @@ def test_upload_from_filename(self):
462465 with NamedTemporaryFile (suffix = '.jpeg' ) as fh :
463466 fh .write (DATA )
464467 fh .flush ()
465- blob .upload_from_filename (fh .name )
468+ found = blob .upload_from_filename (fh .name )
469+ self .assertTrue (found is blob )
466470 rq = connection .http ._requested
467471 self .assertEqual (len (rq ), 1 )
468472 self .assertEqual (rq [0 ]['method' ], 'POST' )
@@ -498,7 +502,8 @@ def test_upload_from_string_w_bytes(self):
498502 bucket = _Bucket (connection )
499503 blob = self ._makeOne (bucket , BLOB_NAME )
500504 blob .CHUNK_SIZE = 5
501- blob .upload_from_string (DATA )
505+ found = blob .upload_from_string (DATA )
506+ self .assertTrue (found is blob )
502507 rq = connection .http ._requested
503508 self .assertEqual (len (rq ), 1 )
504509 self .assertEqual (rq [0 ]['method' ], 'POST' )
@@ -536,7 +541,8 @@ def test_upload_from_string_w_text(self):
536541 bucket = _Bucket (connection )
537542 blob = self ._makeOne (bucket , BLOB_NAME )
538543 blob .CHUNK_SIZE = 5
539- blob .upload_from_string (DATA )
544+ found = blob .upload_from_string (DATA )
545+ self .assertTrue (found is blob )
540546 rq = connection .http ._requested
541547 self .assertEqual (len (rq ), 1 )
542548 self .assertEqual (rq [0 ]['method' ], 'POST' )
0 commit comments