#NEWLINE# def test_children8( self ) : #NEWLINE# #INDENT# ' Remove prefix and check old parent is correctly updated\n        ' #NEWLINE# th = TestHelper ( ) #NEWLINE# p1 = th . add_prefix ( '1.0.0.0/20' , 'reservation' , 'test' ) #NEWLINE# p2 = th . add_prefix ( '1.0.0.0/22' , 'reservation' , 'test' ) #NEWLINE# p3 = th . add_prefix ( '1.0.0.0/24' , 'reservation' , 'test' ) #NEWLINE# p4 = th . add_prefix ( '1.0.1.0/24' , 'reservation' , 'test' ) #NEWLINE# p5 = th . add_prefix ( '1.0.7.0/24' , 'reservation' , 'test' ) #NEWLINE# p2 . prefix = '2.0.0.0/22' #NEWLINE# p2 . save ( ) #NEWLINE# res = Prefix . smart_search ( '1.0.0.0/20' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 3 , res [ 'result' ] [ 0 ] . children ) #NEWLINE# p2 . prefix = '1.0.0.0/22' #NEWLINE# p2 . save ( ) #NEWLINE# res = Prefix . smart_search ( '1.0.0.0/20' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 2 , res [ 'result' ] [ 0 ] . children )