'Test that HTTPException\'s headers do not add a duplicate
Content-Length header
https://github.com/flask-restful/flask-restful/issues/534'

def test_exception_header_forwarding_doesnt_duplicate_headers(self):

    app = Flask(__name__)
    api = flask_restful.Api(app)
    with app.test_request_context('/'):
        r = api.handle_error(BadRequest())
    self.assertEqual(len(r.headers.getlist('Content-Length')), 1)
