Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that blueprints with no slash is maintained when applied #2085

Merged
merged 3 commits into from
Mar 23, 2021

Conversation

ahopkins
Copy link
Member

Resolves #2080
Replaces #2079

@ahopkins ahopkins requested a review from a team as a code owner March 22, 2021 21:48
@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #2085 (4cdf229) into master (4998fd5) will not change coverage.
The diff coverage is 100.000%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #2085   +/-   ##
=========================================
  Coverage   92.253%   92.253%           
=========================================
  Files           38        38           
  Lines         3485      3485           
  Branches       583       583           
=========================================
  Hits          3215      3215           
  Misses         183       183           
  Partials        87        87           
Impacted Files Coverage Δ
sanic/blueprints.py 100.000% <100.000%> (ø)
sanic/mixins/routes.py 94.898% <100.000%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4998fd5...4cdf229. Read the comment docs.

yunstanford
yunstanford previously approved these changes Mar 22, 2021
tests/test_routes.py Outdated Show resolved Hide resolved
@ahopkins ahopkins merged commit dfd1787 into master Mar 23, 2021
@ahopkins ahopkins deleted the issue-2080 branch March 23, 2021 00:28
@ashleysommer
Copy link
Member

ashleysommer commented Mar 23, 2021

Not sure if this covers the condition when BP's (url_prefix == "" or url_prefix is None) and route == "".

@ahopkins
Copy link
Member Author

bp = Blueprint("test")

@bp.get("")
def bar(req):
    return text("bar")
$ curl localhost:8888/ localhost:8888
bar
bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants