From 15bd29ae2c251d625c3a92a8826aae0385900b13 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 6 Feb 2009 00:50:25 +0000 Subject: Better docs. --- repoze/bfg/testing.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/repoze/bfg/testing.py b/repoze/bfg/testing.py index 6bc96fced..e65351ce8 100644 --- a/repoze/bfg/testing.py +++ b/repoze/bfg/testing.py @@ -30,9 +30,11 @@ def registerModels(models): testing code that wants to call the ``repoze.bfg.traversal.find_model`` API. The ``find_model`` API is called with a path as one of its arguments. If the dictionary - you register when calling this method contains that path as a key - (e.g. '/foo/bar' or 'foo'), the corresponding value will be - returned to ``find_model`` (and thus to your code).""" + you register when calling this method contains that path as a + string key (e.g. ``/foo/bar`` or ``foo/bar``, the corresponding + value will be returned to ``find_model`` (and thus to your code) + when ``find_model`` is called with an equivalent path string or + tuple.""" traverser = make_traverser_factory(models) registerTraverserFactory(traverser) return models @@ -167,7 +169,8 @@ def make_traverser_factory(root): self.context = context def __call__(self, environ): - ob = root[environ['PATH_INFO']] + path = environ['PATH_INFO'] + ob = root[path] return ob, '', [] return DummyTraverserFactory -- cgit v1.2.3