-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maurits van Rees wrote:
> Log message for revision 84271:
> Merge 84270 from trunk: During object manager imports do not throw an
> error when trying to remove an object that was already removed.
<snip>
> +class ObjectManagerHelpersTests(unittest.TestCase):
> +
> + def _getTargetClass(self):
> + from Products.GenericSetup.utils import ObjectManagerHelpers
> +
> + return ObjectManagerHelpers
> +
> + def _makeOne(self, *args, **kw):
> + from Products.GenericSetup.utils import NodeAdapterBase
> +
> + class Foo(self._getTargetClass(), NodeAdapterBase):
> +
> + pass
> +
> + return Foo(*args, **kw)
> +
> + def setUp(self):
> + from OFS.ObjectManager import ObjectManager
> +
> + obj = ObjectManager('obj')
> + self.helpers = self._makeOne(obj, DummySetupEnviron())
> +
> + def test__initObjects(self):
> + obj = self.helpers.context
> + self.failIf('history' in obj.objectIds())
> +
> + # Add object
> + node = parseString(_ADD_IMPORT).documentElement
> + self.helpers._initObjects(node)
> + self.failUnless('history' in obj.objectIds())
> +
> + # Remove it again
> + node = parseString(_REMOVE_IMPORT).documentElement
> + self.helpers._initObjects(node)
> + self.failIf('history' in obj.objectIds())
> +
> + # Removing it a second time should not throw an
> + # AttributeError.
> + node = parseString(_REMOVE_IMPORT).documentElement
> + self.helpers._initObjects(node)
> + self.failIf('history' in obj.objectIds())
> +
> +
Marits, the new test you wrote here is failing when run on the Zope 2.11
branch or the trunk[1]: can you please diagnose why, and remediate?
[1] http://mail.zope.org/pipermail/cmf-tests/2008-February/008099.html
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 [EMAIL PROTECTED]
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHxbxm+gerLs4ltQ4RAiWmAKDLO1x0Ei1bwQ0XgNBd6lQ4i63SJACgsiim
vMtCQ80/yVt+hP47iwtIQAU=
=rOoi
-----END PGP SIGNATURE-----
_______________________________________________
Zope-CMF maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests