#NEWLINE# def testPrune( self ) : #NEWLINE# #INDENT# '\n        This test will esnure that objects are pruned (removed) when the \n        position.count + CONTENT_OVERLAP_COUNT is exceeded.\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# pc = PositionContent . objects . filter ( position = self . samplePosition ) #NEWLINE# self . assertEqual ( len ( pc ) , 5 ) #NEWLINE# Position . objects . add_object ( self . samplePosition , self . text6 ) #NEWLINE# pc = PositionContent . objects . filter ( position = self . samplePosition ) #NEWLINE# self . assertEqual ( len ( pc ) , 5 ) #NEWLINE# self . assertNotEqual ( pc [ 4 ] , self . text1 )