summaryrefslogtreecommitdiff
path: root/tests/test_config
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2018-11-04 13:25:32 -0600
committerMichael Merickel <michael@merickel.org>2018-11-04 13:25:32 -0600
commit44e7e63ac1f95d52bdd25c22c36efd820c059e35 (patch)
treee6062558dd3c5a4716f9cd521059f1621bc76457 /tests/test_config
parent6f0d73d6eea8064f1c5d9294beb7f7d64619071d (diff)
parentde5e4f40e0246d71ba5875c957281fb764da74dd (diff)
downloadpyramid-44e7e63ac1f95d52bdd25c22c36efd820c059e35.tar.gz
pyramid-44e7e63ac1f95d52bdd25c22c36efd820c059e35.tar.bz2
pyramid-44e7e63ac1f95d52bdd25c22c36efd820c059e35.zip
Merge branch 'pr/1639' into bare-route-prefix
Diffstat (limited to 'tests/test_config')
-rw-r--r--tests/test_config/test_routes.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_config/test_routes.py b/tests/test_config/test_routes.py
index 32a64b4bd..1c1ed6700 100644
--- a/tests/test_config/test_routes.py
+++ b/tests/test_config/test_routes.py
@@ -54,6 +54,18 @@ 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):
+ config = self._makeOne(autocommit=True)
+ config.route_prefix = 'root'
+ config.add_route('name', '')
+ self._assertRoute(config, 'name', 'root')
+
+ def test_add_route_with_root_slash_with_route_prefix(self):
+ config = self._makeOne(autocommit=True)
+ config.route_prefix = 'root'
+ config.add_route('name', '/')
+ self._assertRoute(config, 'name', 'root/')
+
def test_add_route_discriminator(self):
config = self._makeOne()
config.add_route('name', 'path')