Downsides of moving from Products to lib/python?

Reinout van Rees reinout at vanrees.org
Wed Sep 12 11:28:02 UTC 2007


Kai Diefenbach wrote:

> How can I make Zope call the initialize method for tests as it does when
> it starts the normal way?

Copy-pasted from one of Maurits' testcases:



from Products.Five import pythonproducts

class MainTestCase(testcase):
     """Base TestCase for plonehrm."""

     def afterSetUp(self):
         pythonproducts.applyPatches()

     def afterClear(self):
         pythonproducts.removePatches()



It works just fine for me if I add this. Make sure you don't override 
the afterSetUp() in subsequent testcases (in case you're inheriting from 
a base testcase).

Reinout


-- 
Reinout van Rees  - Programmer at http://zestsoftware.nl/
http://vanrees.org/weblog/     mailto:reinout at vanrees.org
"White space, the opposite of black hole?" -- Joris slob





More information about the Product-Developers mailing list