Commit 7df7dadc by Jacob Magnusson

Remove `request' from response instance while

testing caching
parent bd5a3ee7
...@@ -462,12 +462,13 @@ class CacheRenderTest(TestCase): ...@@ -462,12 +462,13 @@ class CacheRenderTest(TestCase):
def http_resp(self, http_method, url): def http_resp(self, http_method, url):
""" """
Simple wrapper for Client http requests Simple wrapper for Client http requests
Removes the `client' attribute from the response as an instance Removes the `client' and `request' attributes from as they are
of `django.test.client.Client' is not pickable added by django.test.client.Client and not part of caching
responses outside of tests.
""" """
method = getattr(self.client, http_method) method = getattr(self.client, http_method)
resp = method(url) resp = method(url)
del resp.client del resp.client, resp.request
return resp return resp
def test_obj_pickling(self): def test_obj_pickling(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment