diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-09-05 04:58:23 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-09-05 04:58:23 +0000 |
| commit | 844e98b01c5c6aa1585a76ac77f92bb8c1ef9d90 (patch) | |
| tree | d88407f6af193047b4892b328cbd76c101d2300d /repoze/bfg/tests/test_testing.py | |
| parent | 2d4f61826a0ebc5330b869713abf7a36a69c0e6a (diff) | |
| download | pyramid-844e98b01c5c6aa1585a76ac77f92bb8c1ef9d90.tar.gz pyramid-844e98b01c5c6aa1585a76ac77f92bb8c1ef9d90.tar.bz2 pyramid-844e98b01c5c6aa1585a76ac77f92bb8c1ef9d90.zip | |
Documentation
-------------
- Add an API chapter for the ``repoze.bfg.request`` module, which
includes documentation for the ``repoze.bfg.request.Request`` class
(the "request object").
- Modify the "Request and Response" narrative chapter to reference the
new ``repoze.bfg.request`` API chapter. Some content was moved from
this chapter into the API documentation itself.
Features
--------
- A new ``repoze.bfg.request.Request.add_response_callback`` API has
been added. This method is documented in the new
``repoze.bfg.request`` API chapter. It can be used to influence
response values before a concrete response object has been created.
Internal
--------
- The (internal) feature which made it possible to attach a
``global_response_headers`` attribute to the request (which was
assumed to contain a sequence of header key/value pairs which would
later be added to the response by the router), has been removed.
The functionality of
``repoze.bfg.request.Request.add_response_callback`` takes its
place.
Diffstat (limited to 'repoze/bfg/tests/test_testing.py')
| -rw-r--r-- | repoze/bfg/tests/test_testing.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_testing.py b/repoze/bfg/tests/test_testing.py index b24843e77..b900a44a4 100644 --- a/repoze/bfg/tests/test_testing.py +++ b/repoze/bfg/tests/test_testing.py @@ -514,6 +514,12 @@ class TestDummyRequest(unittest.TestCase): request = self._makeOne(water = 1) self.assertEqual(request.water, 1) + def test_add_response_callback(self): + request = self._makeOne() + request.add_response_callback(1) + self.assertEqual(request.response_callbacks, [1]) + + class TestDummyTemplateRenderer(unittest.TestCase): def _getTargetClass(self, ): from repoze.bfg.testing import DummyTemplateRenderer |
