#NEWLINE# def test_edit_pool( self ) : #NEWLINE# #INDENT# ' Test editing a pool\n        ' #NEWLINE# attr = { #NEWLINE# #INDENT# 'name' : 'test_pool_2' , #NEWLINE# 'description' : 'Test pool #2' , #NEWLINE# 'default_type' : 'reservation' , #NEWLINE# 'ipv4_default_prefix_length' : 31 , #NEWLINE# 'ipv6_default_prefix_length' : 112 , #NEWLINE# #UNINDENT# } #NEWLINE# attr2 = { #NEWLINE# #INDENT# 'name' : 'test_pool_2_edit' , #NEWLINE# 'description' : 'Test pool #2 edit' , #NEWLINE# 'default_type' : 'assignment' , #NEWLINE# 'ipv4_default_prefix_length' : 30 , #NEWLINE# 'ipv6_default_prefix_length' : 96 , #NEWLINE# #UNINDENT# } #NEWLINE# res = s . add_pool ( { #NEWLINE# #INDENT# 'auth' : ad , #NEWLINE# 'attr' : attr , #NEWLINE# #UNINDENT# } ) #NEWLINE# s . edit_pool ( { #NEWLINE# #INDENT# 'auth' : ad , #NEWLINE# 'pool' : { #NEWLINE# #INDENT# 'id' : attr2 [ 'id' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# 'attr' : attr2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# expected = attr2 . copy ( ) #NEWLINE# expected [ 'id' ] = res [ 'id' ] #NEWLINE# expected [ 'prefixes' ] = [ ] #NEWLINE# expected [ 'vrf_id' ] = None #NEWLINE# expected [ 'vrf_rt' ] = None #NEWLINE# expected [ 'vrf_name' ] = None #NEWLINE# expected [ 'tags' ] = [ ] #NEWLINE# expected [ 'avps' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEquals ( self . _mangle_pool_result ( s . list_pool ( { #NEWLINE# #INDENT# 'auth' : ad , #NEWLINE# 'pool' : { #NEWLINE# #INDENT# 'id' : res [ 'id' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) [ 0 ] ) , expected )