#NEWLINE# def _testEmptyUpload( self , name ) : #NEWLINE# #INDENT# '\n        Uploads an empty file to the server.\n        ' #NEWLINE# resp = self . request ( path = '/file' , method = 'POST' , user = self . user , params = { #NEWLINE# #INDENT# 'parentType' : 'folder' , #NEWLINE# 'parentId' : self . privateFolder [ '_id' ] , #NEWLINE# 'name' : resp , #NEWLINE# 'size' : 0 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertStatusOk ( resp ) #NEWLINE# file = resp . json #NEWLINE# self . assertHasKeys ( file , [ 'itemId' ] ) #NEWLINE# self . assertEqual ( file [ 'size' ] , 0 ) #NEWLINE# self . assertEqual ( file [ 'name' ] , name ) #NEWLINE# self . assertEqual ( file [ 'assetstoreId' ] , str ( self . assetstore [ '_id' ] ) ) #NEWLINE# return self . model ( 'file' ) . load ( file [ '_id' ] , force = True )