#NEWLINE# def test_multiple_delete( ) : #NEWLINE# #INDENT# ( app , db , admin ) = setup ( ) #NEWLINE# ( M1 , _ ) = create_models ( db ) #NEWLINE# db . session . add_all ( [ M1 ( 'a' ) , M1 ( 'b' ) , M1 ( 'c' ) ] ) #NEWLINE# db . session . commit ( ) #NEWLINE# eq_ ( M1 . query . count ( ) , 3 ) #NEWLINE# view = ModelView ( M1 , db . session ) #NEWLINE# admin . add_view ( rv ) #NEWLINE# client = app . test_client ( ) #NEWLINE# rv = client . post ( '/admin/model1/action/' , data = dict ( action = 'delete' , rowid = [ 1 , 2 , 3 ] ) ) #NEWLINE# eq_ ( rv . status_code , 302 ) #NEWLINE# eq_ ( M1 . query . count ( ) , 0 )