[Checkins] SVN: z3c.relationfield/trunk/src/z3c/relationfield/README.txt use grokcore.component instead of grok in doctest as well.

Martijn Faassen faassen at infrae.com
Fri Oct 17 12:03:33 EDT 2008


Log message for revision 92319:
  use grokcore.component instead of grok in doctest as well.
  

Changed:
  U   z3c.relationfield/trunk/src/z3c/relationfield/README.txt

-=-
Modified: z3c.relationfield/trunk/src/z3c/relationfield/README.txt
===================================================================
--- z3c.relationfield/trunk/src/z3c/relationfield/README.txt	2008-10-17 16:02:02 UTC (rev 92318)
+++ z3c.relationfield/trunk/src/z3c/relationfield/README.txt	2008-10-17 16:03:33 UTC (rev 92319)
@@ -19,7 +19,7 @@
 Grok. We first need to grok ftests to make sure we have the right
 utilities registered::
 
-  >>> import grok
+  >>> import grokcore.component as grok
   >>> grok.testing.grok('z3c.relationfield.ftests')
 
 We previously defined an interface ``IItem`` with a relation field in
@@ -266,7 +266,8 @@
 have changed the relations::
 
   >>> from zope.event import notify
-  >>> notify(grok.ObjectModifiedEvent(root['b']))
+  >>> from zope.lifecycleevent import ObjectModifiedEvent
+  >>> notify(ObjectModifiedEvent(root['b']))
 
 We should find now a single relation from ``b`` to ``c``::
 
@@ -294,7 +295,7 @@
 We need to send an ``IObjectModifiedEvent`` to let the catalog know we
 have changed the relations::
 
-  >>> notify(grok.ObjectModifiedEvent(root['b']))
+  >>> notify(ObjectModifiedEvent(root['b']))
 
 Setting the relation on ``b`` to ``None`` should remove that relation
 from the relation catalog, so we shouldn't be able to find it anymore::
@@ -305,7 +306,7 @@
 Let's reestablish the removed relation::
 
   >>> root['b'].rel = RelationValue(c_id)
-  >>> notify(grok.ObjectModifiedEvent(root['b']))
+  >>> notify(ObjectModifiedEvent(root['b']))
 
   >>> sorted(catalog.findRelations({'to_id': c_id})) 
   [<z3c.relationfield.relation.RelationValue object at ...>]
@@ -364,7 +365,7 @@
 A modification event does not actually get this relation cataloged::
 
   >>> before = sorted(catalog.findRelations({'to_id': a_id}))
-  >>> notify(grok.ObjectModifiedEvent(root['d']))
+  >>> notify(ObjectModifiedEvent(root['d']))
   >>> after = sorted(catalog.findRelations({'to_id': a_id}))
   >>> len(before) == len(after)
   True
@@ -373,7 +374,7 @@
 
   >>> from z3c.relationfield import realize_relations
   >>> realize_relations(root['d'])
-  >>> notify(grok.ObjectModifiedEvent(root['d']))
+  >>> notify(ObjectModifiedEvent(root['d']))
 
 The relation will now show up in the catalog::
 



More information about the Checkins mailing list