[Zope3-checkins] CVS: Zope3/src/zope/app/utilities - content.py:1.1.2.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 15 19:25:27 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/utilities
In directory cvs.zope.org:/tmp/cvs-serv30690/utilities

Modified Files:
      Tag: dreamcatcher-ttwschema-branch
	content.py 
Log Message:
Added tests for Adding's action() method.

Add content instance tests.

This completes my work, and I am ready to merge, if dreamcatcher would not
have broken three tests... ;)


=== Zope3/src/zope/app/utilities/content.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/utilities/content.py:1.1.2.2	Fri Aug 15 13:11:41 2003
+++ Zope3/src/zope/app/utilities/content.py	Fri Aug 15 18:24:52 2003
@@ -24,6 +24,7 @@
 from zope.app.interfaces.utilities.content import \
      IContentComponentDefinition, IContentComponentInstance
 from zope.app.services.menu import LocalBrowserMenuItem
+from zope.app.services.servicenames import BrowserMenu
 from zope.app.services.utility import UtilityRegistration
 from zope.context import ContextMethod
 from zope.interface import directlyProvides, implements
@@ -52,7 +53,7 @@
         """Once activated, we have to register the new Content Object with the
         appropriate menu.
         """
-        service = zapi.getService(self, "BrowserMenu")
+        service = zapi.getService(self, BrowserMenu)
         # XXX: Should use queryInheritedMenu()
         self.menu = service.queryLocalMenu('add_content')
         # Creating the menu item
@@ -126,8 +127,6 @@
             super(ContentComponentInstance, self).__setattr__(key, value)
         else:
             raise AttributeError, 'Attribute not available'
-
-    __setattr__ = ContextMethod(__setattr__)
 
 
     def getSchema(self):




More information about the Zope3-Checkins mailing list