summaryrefslogtreecommitdiff
path: root/pecan/tests/test_rest.py
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/tests/test_rest.py')
-rw-r--r--pecan/tests/test_rest.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pecan/tests/test_rest.py b/pecan/tests/test_rest.py
index 96e3d84..ba4d141 100644
--- a/pecan/tests/test_rest.py
+++ b/pecan/tests/test_rest.py
@@ -1622,3 +1622,19 @@ class TestRestController(PecanTestCase):
r = app.get('/foo/%F0%9F%8C%B0/')
assert r.status_int == 200
assert r.body == b'Hello, World!'
+
+
+class TestExplicitRoute(PecanTestCase):
+
+ def test_alternate_route(self):
+
+ class RootController(RestController):
+
+ @expose(route='some-path')
+ def get_all(self):
+ return "Hello, World!"
+
+ self.assertRaises(
+ ValueError,
+ RootController
+ )