#NEWLINE# def test_prefix_edit( self ) : #NEWLINE# #INDENT# ' Verify indent is correct after prefix edit\n        ' #NEWLINE# th = TestHelper ( ) #NEWLINE# p1 = th . add_prefix ( '192.168.0.0/16' , 'reservation' , 'test' ) #NEWLINE# p2 = th . add_prefix ( '192.168.0.0/24' , 'reservation' , 'test' ) #NEWLINE# p3 = th . add_prefix ( '192.168.1.0/24' , 'reservation' , 'test' ) #NEWLINE# p3 . prefix = '192.168.0.0/20' #NEWLINE# p3 . save ( ) #NEWLINE# expected = [ ] #NEWLINE# expected . append ( [ p1 . prefix , 0 ] ) #NEWLINE# expected . append ( [ p3 . prefix , 1 ] ) #NEWLINE# expected . append ( [ p2 . prefix , 2 ] ) #NEWLINE# res = Prefix . smart_search ( '0.0.0.0/0' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# result = [ ] #NEWLINE# for prefix in res [ 'result' ] : #NEWLINE# #INDENT# result . append ( [ prefix . prefix , prefix . indent ] ) #NEWLINE# #UNINDENT# self . assertEqual ( expected , result )