django-test-utils icon indicating copy to clipboard operation
django-test-utils copied to clipboard

[patch]make cookies available in testmaker(version 0.3)

Open tocer opened this issue 13 years ago • 0 comments

--- testmaker.py 2011-09-08 13:12:48.346351096 +0800 +++ /tmp/vwI7FtA/7 2011-09-08 13:13:08.082909459 +0800 @@ -65,6 +65,8 @@ c = Client(REMOTE_ADDR='127.0.0.1') getdict = request.GET.copy() getdict['test_client_true'] = 'yes' #avoid recursion

  •            for key, value in request.COOKIES.items():
    
  •                c.cookies[key] = value
             response = c.get(request.path, getdict)
             self.serializer.save_response(request, response)
             self.processor.save_response(request, response)
    

tocer avatar Sep 08 '11 05:09 tocer