#NEWLINE# def test_dynamic_queryList( self ) : #NEWLINE# #INDENT# '\n        using get_QueryList allows the construction of dynamic queryLists\n        ' #NEWLINE# view = DynamicQueryView . as_view ( ) #NEWLINE# request = factory . get ( '/Julius-Caesar' ) #NEWLINE# with self . assertNumQueries ( 2 ) : #NEWLINE# #INDENT# response = view ( request , play = 'Julius-Caesar' ) #NEWLINE# #UNINDENT# self . assertEqual ( response . status_code , status . HTTP_200_OK ) #NEWLINE# self . assertEqual ( len ( response . data ) , 2 ) #NEWLINE# self . assertEqual ( response . data , [ { #NEWLINE# #INDENT# 'play' : [ { #NEWLINE# #INDENT# 'title' : 'Julius Caesar' , #NEWLINE# 'genre' : 'Tragedy' , #NEWLINE# 'year' : 1623 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'poem' : [ { #NEWLINE# #INDENT# 'title' : "Shall I compare thee to a summer's day?" , #NEWLINE# 'style' : 'Sonnet' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'title' : 'As a decrepit father takes delight' , #NEWLINE# 'style' : 'Sonnet' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } ] )