diff options
| -rw-r--r-- | repoze/bfg/configuration.py | 2 | ||||
| -rw-r--r-- | repoze/bfg/tests/test_configuration.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index 124ce076a..08f6a6a5c 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -1285,7 +1285,7 @@ class Configurator(object): if mapper is None: mapper = RoutesMapper() self.registry.registerUtility(mapper, IRoutesMapper) - mapper.connect(path, name, factory, predicates=predicates) + return mapper.connect(path, name, factory, predicates=predicates) def scan(self, package=None, categories=None, _info=u''): """ Scan a Python package and any of its subpackages for diff --git a/repoze/bfg/tests/test_configuration.py b/repoze/bfg/tests/test_configuration.py index 0cb8ff5e8..a4a30c7e7 100644 --- a/repoze/bfg/tests/test_configuration.py +++ b/repoze/bfg/tests/test_configuration.py @@ -1510,8 +1510,9 @@ class ConfiguratorTests(unittest.TestCase): def test_add_route_defaults(self): config = self._makeOne() - config.add_route('name', 'path') + route = config.add_route('name', 'path') self._assertRoute(config, 'name', 'path') + self.assertEqual(route.name, 'name') def test_add_route_with_xhr(self): config = self._makeOne() |
