[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/zapi/ Removed "add", "remove", and "site" functions from the IZAPI interface.

Amos Latteier amos at aracnet.com
Thu Feb 24 12:37:16 EST 2005


Log message for revision 29285:
  Removed "add", "remove", and "site" functions from the IZAPI interface.
  They weren't there. Also added a unit test to verify that the zapi
  module actually implements the IZAPI interface.
  

Changed:
  U   Zope3/trunk/src/zope/app/zapi/interfaces.py
  U   Zope3/trunk/src/zope/app/zapi/tests.py

-=-
Modified: Zope3/trunk/src/zope/app/zapi/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/zapi/interfaces.py	2005-02-24 15:08:46 UTC (rev 29284)
+++ Zope3/trunk/src/zope/app/zapi/interfaces.py	2005-02-24 17:37:16 UTC (rev 29285)
@@ -45,22 +45,6 @@
         the message shown the user.
         """
 
-    def add(container, name, object):
-        """Add an object to a container
-
-        This helper function takes care of getting an adapter that
-        publishes necessary errors and calling necessary hooks.
-        
-        """
-
-    def remove(container, name):
-        """Remove an object from a container
-
-        This helper function takes care of getting an adapter that
-        publishes necessary errors and calling necessary hooks.
-        
-        """
-
     def queryType(object, type):
         """Returns the interface implemented by object that provides type.
 
@@ -77,10 +61,6 @@
         is security proxied.
         """
 
-    def site():
-        """Return the current (thread-local) site
-        """
-
     def principals():
         """Return the authentication utility
         """

Modified: Zope3/trunk/src/zope/app/zapi/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/zapi/tests.py	2005-02-24 15:08:46 UTC (rev 29284)
+++ Zope3/trunk/src/zope/app/zapi/tests.py	2005-02-24 17:37:16 UTC (rev 29285)
@@ -18,14 +18,21 @@
 import unittest
 from zope.app.testing import placelesssetup
 from zope.app import zapi
+from zope.interface.verify import verifyObject
 
+class TestIZAPI(unittest.TestCase):
 
+    def test_izapi(self):
+        self.assert_(verifyObject(zapi.interfaces.IZAPI, zapi))
+        
+
 def setUp(test):
     placelesssetup.setUp()
 
 def test_suite():
     from zope.testing import doctest
     return unittest.TestSuite((
+        unittest.makeSuite(TestIZAPI),
         doctest.DocFileSuite('README.txt',
                              setUp=setUp, tearDown=placelesssetup.tearDown),
         ))



More information about the Zope3-Checkins mailing list