[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/ Fixed two unittest failures.

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Aug 23 16:53:09 EDT 2004


Log message for revision 27234:
  Fixed two unittest failures.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/classmodule/browser.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/utilities.py


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/classmodule/browser.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/classmodule/browser.py	2004-08-23 19:51:16 UTC (rev 27233)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/classmodule/browser.py	2004-08-23 20:53:09 UTC (rev 27234)
@@ -671,7 +671,8 @@
         names = self.context.getPath().split('.') 
         crumbs = []
         module = self.context
-        while zapi.isinstance(module, Module):
+        # I really need the class here, so remove the proxy.
+        while zapi.removeSecurityProxy(module).__class__ is Module:
             crumbs.append(
                 {'name': zapi.name(module),
                  'url': zapi.getView(module, 'absolute_url', self.request)()}

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/utilities.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/utilities.py	2004-08-23 19:51:16 UTC (rev 27233)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/utilities.py	2004-08-23 20:53:09 UTC (rev 27234)
@@ -122,6 +122,9 @@
     This method makes only sense for classes and interfaces. Instances do not
     have a `__name__` attribute, so we would expect them to fail.
 
+    If a method is passed in, its class path is returned, since this is the
+    only path we have a page for.
+
     Example::
 
       >>> from zope.interface import Interface
@@ -158,7 +161,7 @@
     if hasattr(naked, "im_class"):
         naked = naked.im_class
     module = naked.__module__
-    return '%s.%s' %(module, obj.__name__)
+    return '%s.%s' %(module, naked.__name__)
 
 
 def _evalId(id):



More information about the Zope3-Checkins mailing list