#NEWLINE# @ mock . patch ( 'eventlet.green.urllib2.urlopen' ) #NEWLINE# def test_scout_socket_timeout( self , mock_urlopen ) : #NEWLINE# #INDENT# mock_urlopen . side_effect = socket . timeout ( 'timeout' ) #NEWLINE# ( url , content , status , ts_start , ts_end ) = self . scout_instance . scout ( ( '127.0.0.1' , '8080' ) ) #NEWLINE# self . assertTrue ( isinstance ( content , socket . timeout ) ) #NEWLINE# self . assertEqual ( url , self . url ) #NEWLINE# self . assertEqual ( ts_end , ( - 1 ) )