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_request.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'repoze/bfg/tests/test_request.py') diff --git a/repoze/bfg/tests/test_request.py b/repoze/bfg/tests/test_request.py index a10ba1a75..6dd05a1ec 100644 --- a/repoze/bfg/tests/test_request.py +++ b/repoze/bfg/tests/test_request.py @@ -165,24 +165,6 @@ class Test_add_global_response_headers(unittest.TestCase): self._callFUT(request, [('c', 1)]) self.assertEqual(request.global_response_headers, headers + [('c', 1)]) -class TestFakeRequest(unittest.TestCase): - def _makeOne(self, environ): - from repoze.bfg.request import FakeRequest - return FakeRequest(environ) - - def test_environ(self): - environ = {'a':1, 'b':2} - request = self._makeOne(environ) - self.assertEqual(request.environ['a'], 1) - self.assertEqual(request.environ['b'], 2) - - def test_asdict(self): - environ = {'a':1, 'b':2} - request = self._makeOne(environ) - self.assertEqual(request['a'], 1) - self.assertEqual(request['b'], 2) - - class DummyRequest: def __init__(self, environ=None): if environ is None: -- cgit v1.2.3