summaryrefslogtreecommitdiff
path: root/paste/fixture.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-02-28 20:58:33 +0000
committerianb <devnull@localhost>2006-02-28 20:58:33 +0000
commit57dc9afc61356e87b885d994fe2c6fe47b20582c (patch)
treeaeecb15869ed0b2a44e653f73443a99899cb9001 /paste/fixture.py
parentcd38b15fc6cf1338e3694bb806c25cc7ea1c7da5 (diff)
downloadpaste-57dc9afc61356e87b885d994fe2c6fe47b20582c.tar.gz
Added a .header_dict and .cookies_set attributes to TestResponse
Diffstat (limited to 'paste/fixture.py')
-rw-r--r--paste/fixture.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index 9a1d4d7..3265583 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -34,6 +34,7 @@ except ImportError:
from paste import wsgilib
from paste import lint
+from paste.response import HeaderDict
def tempnam_no_warning(*args):
"""
@@ -314,10 +315,12 @@ class TestApp(object):
if not req.expect_errors:
self._check_status(status, res)
self._check_errors(res)
+ res.cookies_set = {}
for header in res.all_headers('set-cookie'):
c = SimpleCookie(header)
for key, morsel in c.items():
self.cookies[key] = morsel.value
+ res.cookies_set[key] = morsel.value
if self.namespace is None:
# It's annoying to return the response in doctests, as it'll
# be printed, so we only return it is we couldn't assign
@@ -365,6 +368,7 @@ class TestResponse(object):
self.status = int(status.split()[0])
self.full_status = status
self.headers = headers
+ self.header_dict = HeaderDict.fromlist(self.headers)
self.body = body
self.errors = errors
self._normal_body = None