Commit 02bed0cd authored by Tres Seaver's avatar Tres Seaver

**Don't** pollute os.environ when running tests.

parent 3c67f168
......@@ -24,16 +24,17 @@ $Id$
"""
import os
from os import environ
from sys import stdin, stdout
from ZPublisher.HTTPRequest import HTTPRequest
from ZPublisher.HTTPResponse import HTTPResponse
from ZPublisher.BaseRequest import RequestContainer
def makerequest(app, stdout=stdout):
def makerequest(app, stdout=stdout, **kw):
resp = HTTPResponse(stdout=stdout)
environ['SERVER_NAME']='foo'
environ['SERVER_PORT']='80'
environ['REQUEST_METHOD'] = 'GET'
req = HTTPRequest(stdin, environ, resp)
env = os.environ.copy()
env['SERVER_NAME']='foo'
env['SERVER_PORT']='80'
env['REQUEST_METHOD'] = 'GET'
env.update(kw)
req = HTTPRequest(stdin, env, resp)
return app.__of__(RequestContainer(REQUEST = req))
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