summaryrefslogtreecommitdiff
path: root/tests/test_config
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_config')
-rw-r--r--tests/test_config/test_routes.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/test_config/test_routes.py b/tests/test_config/test_routes.py
index 1c1ed6700..e6540c343 100644
--- a/tests/test_config/test_routes.py
+++ b/tests/test_config/test_routes.py
@@ -54,10 +54,22 @@ class RoutesConfiguratorMixinTests(unittest.TestCase):
config.add_route('name', 'path')
self._assertRoute(config, 'name', 'root/path')
- def test_add_route_with_empty_string_with_route_prefix(self):
+ def test_add_route_with_inherit_errors(self):
+ from pyramid.exceptions import ConfigurationError
+
+ config = self._makeOne(autocommit=True)
+ self.assertRaises(
+ ConfigurationError,
+ config.add_route,
+ 'name',
+ '/',
+ inherit_slash=True,
+ )
+
+ def test_add_route_with_route_prefix_with_inherit_slash(self):
config = self._makeOne(autocommit=True)
config.route_prefix = 'root'
- config.add_route('name', '')
+ config.add_route('name', '', inherit_slash=True)
self._assertRoute(config, 'name', 'root')
def test_add_route_with_root_slash_with_route_prefix(self):