[Zope3-dev] another layers quicky?

Chris Withers chris at simplistix.co.uk
Tue Oct 17 08:21:30 EDT 2006


Hi (yet) again ;-)

class MyLayer:

   @classmethod
   def setUp(self):
     self.app = Testing.ZopeTestCase.Zope2.app()

   @classmethod
   def tearDown(self):
     Testing.ZopeTestCase.close()

class MyTests(TestCase):

   def setUp(self):
     self.savepoint = transaction.savepoint()
     self.app = makerequest(?.app)

   def tearDown(self):
     self.savepoint.rollback()

   ...

What do I put in place of the ? to get hold of the layer's app?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-dev mailing list