#NEWLINE# def test_last_child_repointed_correctly_on_delete( self ) : #NEWLINE# #INDENT# Comment = comments . get_model ( ) #NEWLINE# comment = Comment . objects . get ( pk = 1 ) #NEWLINE# last_child = comment . last_child #NEWLINE# new_child_comment = Comment ( comment = 'Comment 9' , site_id = 1 , content_type_id = 7 , object_pk = 1 , parent_id = comment . id ) #NEWLINE# new_child_comment . save ( ) #NEWLINE# comment = Comment . objects . get ( pk = 1 ) #NEWLINE# self . assertEqual ( comment . last_child , new_child_comment ) #NEWLINE# new_child_comment . delete ( ) #NEWLINE# comment = Comment . objects . get ( pk = 1 ) #NEWLINE# self . assertEqual ( last_child , comment . last_child )