#NEWLINE# def testBlobstore_ParseBlobInfo_Errors( self ) : #NEWLINE# #INDENT# nope = blobstore . parse_blob_info ( None ) #NEWLINE# self . assertEqual ( nope , None ) #NEWLINE# env = { #NEWLINE# #INDENT# 'REQUEST_METHOD' : 'POST' , #NEWLINE# #UNINDENT# } #NEWLINE# hdrs = { #NEWLINE# #INDENT# 'content-disposition' : 'blah; filename=hello.txt; name=hello' , #NEWLINE# 'content-type' : 'text/plain; blob-key=xxx' , #NEWLINE# #UNINDENT# } #NEWLINE# fd = cStringIO . StringIO ( 'Content-length: 42\nX-AppEngine-Upload-Creation: 2012-01-24 17:35:00.000000\nContent-MD5: eHh4\n\n' ) #NEWLINE# fs = cgi . FieldStorage ( fd , headers = hdrs , environ = env ) #NEWLINE# self . assertRaises ( blobstore . BlobInfoParseError , blobstore . parse_blob_info , fs ) #NEWLINE# fd = cStringIO . StringIO ( 'Content-type: image/jpeg\nContent-length: hello\nX-AppEngine-Upload-Creation: 2012-01-24 17:35:00.000000\nContent-MD5: eHh4\n\n' ) #NEWLINE# fs = cgi . FieldStorage ( fd , headers = hdrs , environ = env ) #NEWLINE# self . assertRaises ( blobstore . BlobInfoParseError , blobstore . parse_blob_info , fs ) #NEWLINE# fd = cStringIO . StringIO ( 'Content-type: image/jpeg\nContent-length: 42\nX-AppEngine-Upload-Creation: BLAH-01-24 17:35:00.000000\nContent-MD5: eHh4\n\n' ) #NEWLINE# fs = cgi . FieldStorage ( fd , headers = hdrs , environ = env ) #NEWLINE# self . assertRaises ( blobstore . BlobInfoParseError , blobstore . parse_blob_info , fs )