Skip to content

Commit

Permalink
Avoid makerequest so app is root object (other tests should also avoi…
Browse files Browse the repository at this point in the history
…d this to match the new reality.)
  • Loading branch information
lrowe committed Nov 1, 2011
1 parent 4986214 commit 91e0e00
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/OFS/tests/testCopySupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
from OFS.Application import Application
from OFS.Folder import manage_addFolder
from OFS.Image import manage_addFile
from Testing.makerequest import makerequest
from Testing.makerequest import newrequest
from zope import component
from zope.testing import cleanup
from persistent import Persistent
from zope.globalrequest import setRequest
from zope.location import Location


Expand Down Expand Up @@ -82,7 +83,9 @@ def _initFolders(self):
r['Application'] = a
self.root = a
responseOut = self.responseOut = cStringIO.StringIO()
self.app = makerequest( self.root, stdout=responseOut )
request = newrequest(stdout=responseOut)
setRequest(request)
self.app = a
manage_addFolder( self.app, 'folder1' )
manage_addFolder( self.app, 'folder2' )
folder1 = getattr( self.app, 'folder1' )
Expand Down Expand Up @@ -111,6 +114,7 @@ def _cleanApp( self ):
del self.responseOut
del self.root
del self.connection
setRequest(None)
cleanup.cleanUp()


Expand Down

0 comments on commit 91e0e00

Please sign in to comment.