#NEWLINE# @ mock . patch ( 'eventlet.green.urllib2.urlopen' ) #NEWLINE# def test_scout_server_type_url_error( self , mock_urlopen ) : #NEWLINE# #INDENT# mock_urlopen . side_effect = urllib2 . URLError ( '' ) #NEWLINE# ( url , content , status ) = self . scout_instance . scout_server_type ( ( '127.0.0.1' , '8080' ) ) #NEWLINE# self . assertTrue ( isinstance ( content , urllib2 . URLError ) ) #NEWLINE# self . assertEqual ( url , content . server_type_url ) #NEWLINE# self . assertEqual ( status , ( - 1 ) )