[Zope-dev] Testing zope 3 utilities from zope 2

David Convent david.convent at naturalsciences.be
Tue Jun 12 03:51:10 EDT 2007


hi,

I'm writing a unit test for GS exportimport of the Plone 3.0 
plone.app.viewletmanager product.
the exportimport handler configures a storage which is a Zope 3 utility.

As I want to include support for same node attributes than the skins 
tool exportimport handler, I took inspiration from the tests in 
CMFCore/exportimport/tests.

My problem is that the utility keeps its settings in all test methods of 
a test case.
Therefore, I can not properly test the exportimport steps.

I tried to call unregisterUtility() in the tearDown() method of the test 
class but that doesn't change anything.

Any suggesion on how to solve this particular problem?

Current state of the code is in 
https://svn.plone.org/svn/plone/plone.app.viewletmanager/branches/6649-default-order-support/tests/test_exportimport.py

the test_z_means_last() test method output make it obvious, the utility 
keeps its settings.

Thank you in advance,
David



More information about the Zope-Dev mailing list