#NEWLINE# @ pytest . mark . parametrize ( 'test' , [ ( exceptions . BadRequest , 400 ) , ( exceptions . Unauthorized , 401 ) , ( exceptions . Forbidden , 403 ) , ( exceptions . NotFound , 404 ) , ( exceptions . MethodNotAllowed , 405 , [ 'GET' , 'HEAD' ] ) , ( exceptions . NotAcceptable , 406 ) , ( exceptions . RequestTimeout , 408 ) , ( exceptions . Gone , 410 ) , ( exceptions . LengthRequired , 411 ) , ( exceptions . PreconditionFailed , 412 ) , ( exceptions . RequestEntityTooLarge , 413 ) , ( exceptions . RequestURITooLarge , 414 ) , ( exceptions . UnsupportedMediaType , 415 ) , ( exceptions . UnprocessableEntity , 422 ) , ( exceptions . InternalServerError , 500 ) , ( exceptions . NotImplemented , 501 ) , ( exceptions . BadGateway , 502 ) , ( exceptions . ServiceUnavailable , 503 ) ] ) #NEWLINE# def test_aborter_general( test ) : #NEWLINE# #INDENT# exc_type = test [ 0 ] #NEWLINE# args = test [ 1 : ] #NEWLINE# with pytest . raises ( exc_type ) as exc_info : #NEWLINE# #INDENT# exceptions . abort ( * args ) #NEWLINE# #UNINDENT# assert ( type ( exc_info . value ) is exc_type )