[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/workflow/stateful/
Fix from Markus Leist.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Apr 13 10:57:44 EDT 2005
Log message for revision 29960:
Fix from Markus Leist.
Changed:
U Zope3/trunk/src/zope/app/workflow/stateful/instance.py
U Zope3/trunk/src/zope/app/workflow/stateful/tests/test_instance.py
-=-
Modified: Zope3/trunk/src/zope/app/workflow/stateful/instance.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/instance.py 2005-04-12 21:11:08 UTC (rev 29959)
+++ Zope3/trunk/src/zope/app/workflow/stateful/instance.py 2005-04-13 14:57:44 UTC (rev 29960)
@@ -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
Modified: Zope3/trunk/src/zope/app/workflow/stateful/tests/test_instance.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/tests/test_instance.py 2005-04-12 21:11:08 UTC (rev 29959)
+++ Zope3/trunk/src/zope/app/workflow/stateful/tests/test_instance.py 2005-04-13 14:57:44 UTC (rev 29960)
@@ -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]))
More information about the Zope3-Checkins
mailing list