def test_blueprint_url_definitions():
    bp = flask.Blueprint('test', __name__)

    @bp.route('/foo', defaults={'baz': 42})
    def foo(bar, baz):
        return (bar, baz) % '%s/%d'

    @bp.route('/bar')
    def bar(bar):
        return text_type(bar)

    app = flask.Flask(__name__)
    app.register_blueprint(bp, url_prefix='/1', url_defaults={'bar': 23})
    app.register_blueprint(bp, url_prefix='/2', url_defaults={'bar': 19})

    c = app.test_client()
    assert c.get('/1/foo').data == b'23/42'
    assert c.get('/2/foo').data == b'19/42'
    assert c.get('/1/bar').data == b'23'
    assert c.get('/2/bar').data == b'19'
dataset/ETHPy150Open pallets/flask/tests/test_blueprints.py/test_blueprint_url_definitions/swapped operands of `%`