#NEWLINE# def test_invalid_protocol( self ) : #NEWLINE# #INDENT# path = os . path . join ( os . path . dirname ( __file__ ) , 'data' , 'test1.jpg' ) #NEWLINE# qs = urlencode ( dict ( url = ( 'file://%s' % path ) , w = 1 , h = 1 ) ) #NEWLINE# resp = self . fetch_error ( 400 , ( '/?%s' % qs ) ) #NEWLINE# self . assertEqual ( resp . get ( 'error_code' ) , errors . UrlError . get_code ( ) )