diff --git a/tests/test_requests.py b/tests/test_requests.py index c0824850..f77fd90f 100644 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -133,6 +133,17 @@ def test_query_string(): assert request.args.get('test2') == 'false' +def test_uri_template(): + app = Sanic('test_uri_template') + + @app.route('/foo//bar/') + async def handler(request): + return text('OK') + + request, response = app.test_client.get('/foo/123/bar/baz') + assert request.uri_template == '/foo//bar/' + + def test_token(): app = Sanic('test_post_token')