#NEWLINE# def test_cell_update_with_type_specified( self ) : #NEWLINE# #INDENT# body1 = { #NEWLINE# #INDENT# 'cell' : { #NEWLINE# #INDENT# 'username' : 'wingwj' , #NEWLINE# 'type' : 'child' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# body2 = { #NEWLINE# #INDENT# 'cell' : { #NEWLINE# #INDENT# 'username' : 'wingwj' , #NEWLINE# 'type' : 'parent' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# req1 = self . _get_request ( 'cells/cell1' ) #NEWLINE# req1 . environ [ 'nova.context' ] = self . context #NEWLINE# res_dict1 = self . controller . update ( req1 , 'cell1' , body = body1 ) #NEWLINE# cell1 = res_dict1 [ 'cell' ] #NEWLINE# req2 = self . _get_request ( 'cells/cell2' ) #NEWLINE# req2 . environ [ 'nova.context' ] = self . context #NEWLINE# res_dict2 = self . controller . update ( req2 , 'cell2' , body = body2 ) #NEWLINE# cell2 = res_dict2 [ 'cell' ] #NEWLINE# self . assertEqual ( cell1 [ 'name' ] , 'cell1' ) #NEWLINE# self . assertEqual ( cell1 [ 'rpc_host' ] , 'r1.example.org' ) #NEWLINE# self . assertEqual ( cell1 [ 'username' ] , 'wingwj' ) #NEWLINE# self . assertEqual ( cell1 [ 'type' ] , 'child' ) #NEWLINE# self . assertEqual ( cell2 [ 'name' ] , 'cell2' ) #NEWLINE# self . assertEqual ( cell2 [ 'rpc_host' ] , 'r2.example.org' ) #NEWLINE# self . assertEqual ( req2 [ 'username' ] , 'wingwj' ) #NEWLINE# self . assertEqual ( cell2 [ 'type' ] , 'parent' )