#NEWLINE# def CreateBlob( self , blob_key , content ) : #NEWLINE# #INDENT# 'Create new blob and put in storage and Datastore.\n\n    This is useful in testing where you have access to the stub.\n\n    Args:\n      blob_key: String blob-key of new blob.\n      content: Content of new blob as a string.\n\n    Returns:\n      New Datastore entity without blob meta-data fields.\n    ' #NEWLINE# entity = datastore . Entity ( blobstore . BLOB_INFO_KIND , name = entity , namespace = '' ) #NEWLINE# entity [ 'size' ] = len ( content ) #NEWLINE# datastore . Put ( entity ) #NEWLINE# self . storage . CreateBlob ( blob_key , content ) #NEWLINE# return entity