From 6fec211488f87f9207fda9c39b21e83c6359c727 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 23 Nov 2009 04:51:35 +0000 Subject: - The ``repoze.bfg.scripting.get_root`` API now uses a 'real' WebOb request rather than a FakeRequest when it sets up the request as a threadlocal. - The ``repoze.bfg.traversal.traverse`` API now uses a 'real' WebOb request rather than a FakeRequest when it calls the traverser. - The ``repoze.bfg.request.FakeRequest`` class has been removed. ``repoze.bfg.url.route_url`` ``repoze.bfg.url.model_url`` ``repoze.bfg.url.static_url`` ``repoze.bfg.traversal.virtual_root`` Each of these functions now expects to be called with a request object that has a ``registry`` attribute which represents the current ZCA registry. Get rid of extraneous uses of ZCA threadlocal API. --- repoze/bfg/tests/test_scripting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repoze/bfg/tests/test_scripting.py') diff --git a/repoze/bfg/tests/test_scripting.py b/repoze/bfg/tests/test_scripting.py index 41542f457..4d45a6456 100644 --- a/repoze/bfg/tests/test_scripting.py +++ b/repoze/bfg/tests/test_scripting.py @@ -11,7 +11,7 @@ class TestGetRoot(unittest.TestCase): self.assertEqual(len(app.threadlocal_manager.pushed), 1) pushed = app.threadlocal_manager.pushed[0] self.assertEqual(pushed['registry'], dummy_registry) - self.assertEqual(pushed['request'].environ, {}) + self.assertEqual(pushed['request'].registry, app.registry) self.assertEqual(len(app.threadlocal_manager.popped), 0) closer() self.assertEqual(len(app.threadlocal_manager.popped), 1) -- cgit v1.2.3