#NEWLINE# def test_getOpenCandidates( self ) : #NEWLINE# #INDENT# mock_circuit_1 = mock . Mock ( ) #NEWLINE# mock_circuit_2 = mock . Mock ( ) #NEWLINE# mock_circuit_3 = mock . Mock ( ) #NEWLINE# mock_circuit_1 . canHandleRequest = mock . Mock ( ) #NEWLINE# mock_circuit_2 . canHandleRequest = mock . Mock ( ) #NEWLINE# mock_circuit_3 . canHandleRequest = mock . Mock ( ) #NEWLINE# mock_circuit_1 . canHandleRequest . return_value = True #NEWLINE# mock_circuit_2 . canHandleRequest . return_value = True #NEWLINE# mock_circuit_3 . canHandleRequest . return_value = False #NEWLINE# self . cm . _open_circuit_dict = { #NEWLINE# #INDENT# 1 : mock_circuit_1 , #NEWLINE# 2 : mock_circuit_3 , #NEWLINE# 3 : mock_circuit_3 , #NEWLINE# #UNINDENT# } #NEWLINE# test_val = [ mock_circuit_1 , mock_circuit_2 ] #NEWLINE# self . assertEqual ( self . cm . _getOpenCandidates ( mock . Mock ( ) ) , test_val )