From e5c6e0b6ce8626ae4854dab51334b6680a233cdc Mon Sep 17 00:00:00 2001 From: Channel Cat Date: Sun, 29 Jan 2017 23:21:00 -0800 Subject: [PATCH] . --- tests/test_blueprints.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_blueprints.py b/tests/test_blueprints.py index d48c9ea9..aebb7429 100644 --- a/tests/test_blueprints.py +++ b/tests/test_blueprints.py @@ -233,24 +233,31 @@ def test_bp_shorthand(): app = Sanic('test_shorhand_routes') blueprint = Blueprint('test_shorhand_routes') + @blueprint.get('/get') def handler(request): return text('OK') + @blueprint.put('/put') def handler(request): return text('OK') + @blueprint.post('/post') def handler(request): return text('OK') + @blueprint.head('/head') def handler(request): return text('OK') + @blueprint.options('/options') def handler(request): return text('OK') + @blueprint.patch('/patch') def handler(request): return text('OK') + @blueprint.delete('/delete') def handler(request): return text('OK') @@ -275,6 +282,7 @@ def test_bp_shorthand(): assert response.status == 405 request, response = sanic_endpoint_test(app, uri='/head', method='head') + assert response.status == 200 request, response = sanic_endpoint_test(app, uri='/head', method='get') assert response.status == 405