#NEWLINE# def testGetContent( self ) : #NEWLINE# #INDENT# '\n        This test will ensure that get_content manager method returns the \n        correct number of objects and the correct type of objects.\n        ' #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text1 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text2 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text3 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text4 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text5 ) #NEWLINE# pc1 = Position . objects . get_content ( self . samplePosition ) #NEWLINE# self . assertTrue ( len ( pc1 ) , 3 ) #NEWLINE# for item in pc1 : #NEWLINE# #INDENT# self . assertTrue ( isinstance ( item , SimpleText ) ) #NEWLINE# #UNINDENT# pc2 = Position . objects . get_content ( self . samplePosition , count = 4 ) #NEWLINE# self . assertTrue ( len ( pc2 ) , 4 ) #NEWLINE# pc3 = Position . objects . get_content ( self . samplePosition , as_contenttype = False ) #NEWLINE# pc4 = Position . objects . get_content ( self . samplePosition ) #NEWLINE# for ( count , item ) in enumerate ( pc3 ) : #NEWLINE# #INDENT# self . assertTrue ( item . content_object , pc4 [ count ] ) #NEWLINE# #UNINDENT# pc5 = Position . objects . get_content ( self . samplePosition , as_contenttype = False ) #NEWLINE# for item in pc5 : #NEWLINE# #INDENT# self . assertTrue ( isinstance ( item , PositionContent ) )