summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-02-06 00:50:25 +0000
committerChris McDonough <chrism@agendaless.com>2009-02-06 00:50:25 +0000
commit15bd29ae2c251d625c3a92a8826aae0385900b13 (patch)
tree319adb6165f71e9ce8b02571b4f02b31ed7a1eef
parentdbab77392727456df89d3e91bd97899d919b6654 (diff)
downloadpyramid-15bd29ae2c251d625c3a92a8826aae0385900b13.tar.gz
pyramid-15bd29ae2c251d625c3a92a8826aae0385900b13.tar.bz2
pyramid-15bd29ae2c251d625c3a92a8826aae0385900b13.zip
Better docs.
-rw-r--r--repoze/bfg/testing.py11
1 files 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