#NEWLINE# def test_delete_basic( self ) : #NEWLINE# #INDENT# commands = [ EventualCommand ( 'delete' , [ 'foo' ] , { #NEWLINE# #INDENT# 'key_prefix' : 1 , #NEWLINE# #UNINDENT# } ) , EventualCommand ( 'delete' , [ 'bar' ] , { #NEWLINE# #INDENT# 'key_prefix' : 1 , #NEWLINE# #UNINDENT# } ) , EventualCommand ( 'delete' , [ 'baz' ] , { #NEWLINE# #INDENT# 'key_prefix' : 2 , #NEWLINE# #UNINDENT# } ) ] #NEWLINE# items = self . get_grouped_results ( commands , 2 ) #NEWLINE# ( new_command , grouped_commands ) = items [ 0 ] #NEWLINE# self . assertEquals ( len ( commands ) , 2 ) #NEWLINE# self . assertEquals ( grouped_commands , commands [ 0 : 2 ] ) #NEWLINE# self . assertEquals ( new_command . get_name ( ) , 'delete_multi' ) #NEWLINE# self . assertEquals ( new_command . get_args ( ) , ( [ 'foo' , 'bar' ] , ) ) #NEWLINE# self . assertEquals ( new_command . get_kwargs ( ) , { #NEWLINE# #INDENT# 'key_prefix' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( new_command , grouped_commands ) = items [ 1 ] #NEWLINE# self . assertEquals ( len ( grouped_commands ) , 1 ) #NEWLINE# self . assertEquals ( grouped_commands , commands [ 2 : 3 ] ) #NEWLINE# self . assertEquals ( new_command . get_name ( ) , 'delete' ) #NEWLINE# self . assertEquals ( new_command . get_args ( ) , [ 'baz' ] ) #NEWLINE# self . assertEquals ( new_command . get_kwargs ( ) , { #NEWLINE# #INDENT# 'key_prefix' : 2 , #NEWLINE# #UNINDENT# } )