#NEWLINE# def test_update_capabilities( self ) : #NEWLINE# #INDENT# self . _setup_attrs ( 'child-cell2' , 'child-cell2!api-cell' ) #NEWLINE# capabs = { #NEWLINE# #INDENT# 'cap1' : set ( [ 'val1' , 'val2' ] ) , #NEWLINE# 'cap2' : set ( [ 'val3' ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# expected_capabs = { #NEWLINE# #INDENT# 'cap1' : list ( set ( [ 'val1' , 'val2' ] ) ) , #NEWLINE# 'cap2' : [ 'val3' ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . mox . StubOutWithMock ( self . src_state_manager , 'get_our_capabilities' ) #NEWLINE# self . mox . StubOutWithMock ( self . tgt_state_manager , 'update_cell_capabilities' ) #NEWLINE# self . mox . StubOutWithMock ( self . tgt_msg_runner , 'tell_parents_our_capabilities' ) #NEWLINE# self . src_state_manager . get_our_capabilities ( ) . AndReturn ( capabs ) #NEWLINE# self . tgt_state_manager . update_cell_capabilities ( 'child-cell2' , self ) #NEWLINE# self . tgt_msg_runner . tell_parents_our_capabilities ( self . ctxt ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . src_msg_runner . tell_parents_our_capabilities ( self . ctxt )