#NEWLINE# def test_batch_unpublish( self ) : #NEWLINE# #INDENT# with mock_s3 ( ) : #NEWLINE# #INDENT# conn = boto . connect_s3 ( ) #NEWLINE# bucket = conn . create_bucket ( settings . AWS_BUCKET_NAME ) #NEWLINE# keys = [ ] #NEWLINE# for i in range ( 0 , 10000 ) : #NEWLINE# #INDENT# k = boto . s3 . key . Key ( bucket ) #NEWLINE# k . key = i #NEWLINE# k . set_contents_from_string ( ( 'This is test object %s' % i ) ) #NEWLINE# keys . append ( k ) #NEWLINE# #UNINDENT# call_command ( 'unpublish' , no_pooling = True , verbosity = 3 ) #NEWLINE# self . assertFalse ( list ( ( key for key in bucket . list ( ) ) ) )