Skip to content
Myr

Added a testcase for some more routing things between blueprints.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 681cb8f · Browse files · 1 file+19 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+19 added−0 removed

  • other:+19 added−0 removed

1 file+19 added−0 removed

modified:flask/testsuite/blueprints.py+19 added
443 unmodified lines
444 self.assert_equal(c.get('/fe').data.strip(), b'/be')445 self.assert_equal(c.get('/fe2').data.strip(), b'/fe')446 self.assert_equal(c.get('/be').data.strip(), b'/fe')447448 def test_dotted_names_from_app(self):449 app = flask.Flask(__name__)450 app.testing = True451 test = flask.Blueprint('test', __name__)452453 @app.route('/')454 def app_index():455 return flask.url_for('test.index')456457 @test.route('/test/')458 def index():459 return flask.url_for('app_index')460461 app.register_blueprint(test)462463 with app.test_client() as c:464 rv = c.get('/')465 self.assert_equal(rv.data, b'/test/')466467 def test_empty_url_defaults(self):468 bp = flask.Blueprint('bp', __name__)469470 @bp.route('/', defaults={'page': 1})
320 unmodified lines