#NEWLINE# def test_get_slave_returns_expected_value_given_valid_arguments( self ) : #NEWLINE# #INDENT# master = ClusterMaster ( ) #NEWLINE# master . connect_slave ( 'raphael.turtles.gov' , 10 ) #NEWLINE# master . connect_slave ( 'leonardo.turtles.gov' , 10 ) #NEWLINE# master . connect_slave ( 'donatello.turtles.gov' , 10 ) #NEWLINE# actual_slave_by_id = master . get_slave ( slave_id = 2 ) #NEWLINE# actual_slave_by_url = master . get_slave ( slave_url = 'leonardo.turtles.gov' ) #NEWLINE# self . assertEqual ( 2 , actual_slave_by_url . id , 'Retrieved slave should have the same id as requested.' ) #NEWLINE# self . assertEqual ( 'leonardo.turtles.gov' , actual_slave_by_url . url , 'Retrieved slave should have the same url as requested.' )