#NEWLINE# @ record #NEWLINE# def test_create_blob_from_stream_chunked_upload_truncated( self ) : #NEWLINE# #INDENT# blob_name = self . _get_blob_reference ( ) #NEWLINE# data = self . get_random_bytes ( LARGE_BLOB_SIZE ) #NEWLINE# with open ( FILE_PATH , 'wb' ) as stream : #NEWLINE# #INDENT# stream . write ( data ) #NEWLINE# #UNINDENT# blob_size = ( len ( data ) - 512 ) #NEWLINE# with open ( FILE_PATH , 'rb' ) as stream : #NEWLINE# #INDENT# self . bs . create_blob_from_stream ( self . container_name , blob_name , stream , stream ) #NEWLINE# #UNINDENT# self . assertBlobEqual ( self . container_name , blob_name , data [ : blob_size ] )