-
-
Save tswicegood/ccb43b501ff8c3f7c4c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_allows_nested_routes(self): | |
r = routes.Router() | |
@r.get("/foo") | |
def handle_foo(request): | |
return "\n".join([ | |
"request.path: %s" % request.path, | |
"request.original_path: %s" % request.original_path, | |
]) | |
a = app.Steinie() | |
a.use("/bar", r) | |
with utils.run_app(a): | |
response = utils.get("http://localhost:5151/bar/foo") | |
expected = "\n".join([ | |
"request.path: /foo", | |
"request.original_path: /bar/foo", | |
]) | |
self.assertEqual(expected, response.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment