#NEWLINE# def test_list_display( ) : #NEWLINE# #INDENT# return #NEWLINE# ( app , db , admin ) = setup ( ) #NEWLINE# ( Model1 , Model2 ) = create_models ( db ) #NEWLINE# view = CustomModelView ( Model1 , db . session , list_columns = [ 'test1' , 'test3' ] , rename_columns = dict ( test1 = 'Column1' ) ) #NEWLINE# admin . add_view ( view ) #NEWLINE# eq_ ( len ( view . _list_columns ) , 2 ) #NEWLINE# eq_ ( view . _list_columns , [ ( 'test1' , 'Column1' ) , ( 'test3' , 'Test3' ) ] ) #NEWLINE# client = app . test_client ( ) #NEWLINE# resp = client . get ( '/admin/model1view/' ) #NEWLINE# ok_ ( ( 'Column1' in resp . data ) ) #NEWLINE# ok_ ( ( 'Test2' not in resp . data ) )