Author: jmorliaguet
Date: Tue Apr 25 23:05:11 2006
New Revision: 2965

Modified:
   cpsskins/branches/paris-sprint-2006/doc/registration.txt
Log:

- added test for mapping interfaces to names



Modified: cpsskins/branches/paris-sprint-2006/doc/registration.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/doc/registration.txt    (original)
+++ cpsskins/branches/paris-sprint-2006/doc/registration.txt    Tue Apr 25 
23:05:11 2006
@@ -140,11 +140,11 @@
     TODO
 
 
-Interface types
----------------
+Interface registered as utilities
+---------------------------------
 
     >>> from zope.component.interface import provideInterface
-    >>> from zope.component import queryUtility
+    >>> from zope.component import queryUtility, getUtilitiesFor
     >>> from zope.interface import Interface
 
     >>> from cpsskins.setup.interfaces import INameType
@@ -162,3 +162,8 @@
     >>> queryUtility(INameType, u'unknown', None) is None
     True
 
+interface to name:
+
+    >>> [name for name, iface in getUtilitiesFor(INameType) if iface == IDummy]
+    [u'dummy']
+
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to