#NEWLINE# def testPostNoPackageInfoFileUploaded( self ) : #NEWLINE# #INDENT# 'Test post with no file supplied.' #NEWLINE# self . mox . StubOutWithMock ( uploadpkg . handlers , 'IsBlobstore' ) #NEWLINE# uploadpkg . handlers . IsBlobstore ( ) . AndReturn ( True ) #NEWLINE# self . MockDoMunkiAuth ( require_level = uploadpkg . gaeserver . LEVEL_UPLOADPKG ) #NEWLINE# self . MockSelf ( 'get_uploads' ) #NEWLINE# upload_files = [ 'some file' ] #NEWLINE# pkginfo_files = [ ] #NEWLINE# filename = 'fooname.dmg' #NEWLINE# pkginfo = 'anything' #NEWLINE# install_types = [ 'managed_installs' , 'managed_updates' ] #NEWLINE# catalogs = [ 'unstable' ] #NEWLINE# self . request . get ( 'user' ) . AndReturn ( 'foouser' ) #NEWLINE# self . request . get ( 'name' ) . AndReturn ( filename ) #NEWLINE# self . request . get ( 'install_types' ) . AndReturn ( ',' . join ( filename ) ) #NEWLINE# self . request . get ( 'catalogs' , None ) . AndReturn ( ',' . join ( catalogs ) ) #NEWLINE# self . request . get ( 'manifests' , None ) . AndReturn ( None ) #NEWLINE# self . c . get_uploads ( 'file' ) . AndReturn ( upload_files ) #NEWLINE# self . c . get_uploads ( 'pkginfo' ) . AndReturn ( pkginfo_files ) #NEWLINE# self . request . get ( 'pkginfo' ) . AndReturn ( None ) #NEWLINE# self . MockRedirect ( '/uploadpkg?mode=error&msg=No%20file%20received' ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . c . post ( ) #NEWLINE# self . mox . VerifyAll ( )