Skip to content
Myr

Fix blueprint route for ""

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

authored by Hsiaoming Yang · committed by Hsiaoming Yang · parent 3fd7abe · Browse files · 2 files+5 added−1 removed
This commit

State

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

Diff stats

2 files+5 added−1 removed

  • tests:+1 added−0 removed
  • other:+4 added−1 removed

2 files+5 added−1 removed

modified:flask/blueprints.py+4 added-1 removed
64 unmodified lines
65 to the application. The endpoint is automatically prefixed with the66 blueprint's name.67 """68 if self.url_prefix is not None:69 if rule:69 rule = '/'.join((self.url_prefix, rule.lstrip('/')))70 rule = '/'.join((self.url_prefix, rule.lstrip('/')))71 else:72 rule = self.url_prefix73 options.setdefault('subdomain', self.subdomain)74 if endpoint is None:75 endpoint = _endpoint_from_view_func(view_func)76 defaults = self.url_defaults
372 unmodified lines
modified:tests/test_blueprints.py+1 added
114 unmodified lines
115 assert client.get('/nope').data == b'you shall not pass'116117118@pytest.mark.parametrize(('prefix', 'rule', 'url'), (119 ('/foo', '', '/foo'),120 ('/foo/', '/bar', '/foo/bar'),121 ('/foo/', 'bar', '/foo/bar'),122 ('/foo', '/bar', '/foo/bar'),123 ('/foo/', '//bar', '/foo/bar'),
728 unmodified lines