Commit a2ca2136 authored by Martijn Pieters's avatar Martijn Pieters

Allow a testcase to redirect the stdout of the created HTTPResponse to an

object of its choosing, so we can retrieve the output of RESPONSE.write().
parent effc3393
......@@ -91,19 +91,19 @@ Usage:
import makerequest
app = makerequest.makerequest(Zope.app())
$Id: makerequest.py,v 1.2 2001/03/15 13:16:25 jim Exp $
$Id: makerequest.py,v 1.3 2001/04/18 23:02:04 mj Exp $
"""
import os
from os import environ
from sys import stdin
from sys import stdin, stdout
from ZPublisher.HTTPRequest import HTTPRequest
from ZPublisher.HTTPResponse import HTTPResponse
from ZPublisher.BaseRequest import RequestContainer
def makerequest(app):
resp = HTTPResponse()
def makerequest(app, stdout=stdout):
resp = HTTPResponse(stdout=stdout)
environ['SERVER_NAME']='foo'
environ['SERVER_PORT']='80'
environ['REQUEST_METHOD'] = 'GET'
......
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