Am Samstag, 2. April 2005 15:52 schrieb Stephan Richter:
[...]
> If you can provide a test, I check it in. The test is always what takes
> time. :-)
>

hope, it's ok in  this kind?

ps.
in my case finding the error was difficult  ;-)

root:./src/zope/app/workflow/stateful# svn diff
Index: tests/test_instance.py
===================================================================
--- tests/test_instance.py      (revision 29606)
+++ tests/test_instance.py      (working copy)
@@ -124,6 +124,9 @@
         self.assertEqual(data.text, 'no text')
         self.assertEqual(data.value, 1)
 
+        self.assertNotEqual(data.__parent__, None)
+        self.assertEqual(self.pi, self.pi.data.__parent__)
+
         data.text = 'another text'
         self.assert_(IBeforeRelevantDataChangeEvent.providedBy(events[0])) 
         self.assert_(IAfterRelevantDataChangeEvent.providedBy(events[-1])) 
Index: instance.py
===================================================================
--- instance.py (revision 29606)
+++ instance.py (working copy)
@@ -181,6 +181,7 @@
         if schema:
             # create relevant-data
             self._data = RelevantData(schema, clean_pd.schemaPermissions)
+            self._data.__parent__ = self
         else:
             self._data = None
         # setup permission on data

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to