#NEWLINE# def test_upload_tar_gz( self ) : #NEWLINE# #INDENT# with open ( os . path . join ( self . tmpdir , 'example.tar.gz' ) ) as fp : #NEWLINE# #INDENT# response = self . client . post ( reverse ( 'upload_folder' , kwargs = { #NEWLINE# #INDENT# 'collection_cid' : self . coll . id , #NEWLINE# #UNINDENT# } ) , { #NEWLINE# #INDENT# 'collection_cid' : self . coll . id , #NEWLINE# 'file' : fp , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# self . assertEqual ( response . status_code , 302 ) #NEWLINE# self . assertEqual ( self . coll . basecollectionitem_set . instance_of ( Image ) . count ( ) , 4 )