#NEWLINE# def test_flat_no_label( self ) : #NEWLINE# #INDENT# '\n        Putting flat=True should flatten the data to a single list of elements\n        ' #NEWLINE# view = FlatNoLabelView . as_view ( ) #NEWLINE# request = factory . get ( '/' ) #NEWLINE# with self . assertNumQueries ( 2 ) : #NEWLINE# #INDENT# response = view ( request ) . render ( ) #NEWLINE# #UNINDENT# self . assertEqual ( response . status_code , status . HTTP_200_OK ) #NEWLINE# self . assertEqual ( len ( response . data ) , 6 ) #NEWLINE# self . assertEqual ( response . data , [ OrderedDict ( [ ( 'genre' , 'Tragedy' ) , ( 'title' , 'Romeo And Juliet' ) , ( 'year' , 1597 ) ] ) , OrderedDict ( [ ( 'genre' , 'Comedy' ) , ( 'title' , "A Midsummer Night's Dream" ) , ( 'year' , 1600 ) ] ) , OrderedDict ( [ ( 'genre' , 'Tragedy' ) , ( 'title' , 'Julius Caesar' ) , ( 'year' , 1623 ) ] ) , OrderedDict ( [ ( 'genre' , 'Comedy' ) , ( 'title' , 'As You Like It' ) , ( 'year' , 1623 ) ] ) , OrderedDict ( [ ( 'title' , "Shall I compare thee to a summer's day?" ) , ( 'style' , 'Sonnet' ) ] ) , OrderedDict ( [ ( 'title' , 'As a decrepit father takes delight' ) , ( 'style' , 'Sonnet' ) ] ) ] )