[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/browser -
apidoc.py:1.3
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sun Mar 28 18:39:33 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/apidoc/browser
In directory cvs.zope.org:/tmp/cvs-serv22063/src/zope/app/apidoc/browser
Modified Files:
apidoc.py
Log Message:
Added tests.
=== Zope3/src/zope/app/apidoc/browser/apidoc.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/apidoc/browser/apidoc.py:1.2 Wed Mar 10 07:24:16 2004
+++ Zope3/src/zope/app/apidoc/browser/apidoc.py Sun Mar 28 18:39:32 2004
@@ -17,11 +17,23 @@
"""
from zope.app.apidoc.utilities import stx2html
-class APIDocumentation(object):
+class APIDocumentationView(object):
"""View for the API Documentation"""
def getModuleList(self):
- """Get a list of all available documentation modules."""
+ """Get a list of all available documentation modules.
+
+ Example::
+
+ >>> from zope.app.apidoc import APIDocumentation
+
+ >>> view = APIDocumentationView()
+ >>> view.context = APIDocumentation(None, '++apidoc++')
+ >>> info = view.getModuleList()
+ >>> info = [(i['name'], i['title']) for i in info]
+ >>> print info
+ [('Interface', 'Interfaces'), ('ZCML', 'ZCML Reference')]
+ """
items = list(self.context.items())
items.sort()
return [{'name': name,
More information about the Zope3-Checkins
mailing list