[Zope3-checkins] CVS: Zope3/src/zope/app/component/tests - service.py:1.3 test_directives.py:1.8 test_requirepermissions.py:1.2 test_servicemanagercontainer.py:1.7
Steve Alexander
steve@cat-box.net
Sat, 7 Jun 2003 02:37:52 -0400
Update of /cvs-repository/Zope3/src/zope/app/component/tests
In directory cvs.zope.org:/tmp/cvs-serv4294/src/zope/app/component/tests
Modified Files:
service.py test_directives.py test_requirepermissions.py
test_servicemanagercontainer.py
Log Message:
updated to use new-style interface declarations
=== Zope3/src/zope/app/component/tests/service.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/component/tests/service.py:1.2 Wed Dec 25 09:12:46 2002
+++ Zope3/src/zope/app/component/tests/service.py Sat Jun 7 02:37:21 2003
@@ -17,7 +17,7 @@
"""
__metaclass__ = type # All classes are new style when run with Python 2.2+
-from zope.interface import Interface
+from zope.interface import Interface, implements
class IFooService(Interface):
@@ -26,7 +26,7 @@
class FooService:
- __implements__ = IFooService
+ implements(IFooService)
def foo(self): return "foo here"
def foobar(self): return "foobarred"
=== Zope3/src/zope/app/component/tests/test_directives.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/component/tests/test_directives.py:1.7 Wed May 28 13:19:21 2003
+++ Zope3/src/zope/app/component/tests/test_directives.py Sat Jun 7 02:37:21 2003
@@ -34,6 +34,7 @@
from zope.app.tests.placelesssetup import PlacelessSetup
from zope.component.tests.views import IV, IC, V1, VZMI, R1, RZMI
from zope.component.tests.request import Request
+from zope.interface import implements
template = """<zopeConfigure
@@ -43,7 +44,7 @@
</zopeConfigure>"""
class Ob:
- __implements__ = IC
+ implements(IC)
def definePermissions():
XMLConfig('meta.zcml', zope.app.component)()
=== Zope3/src/zope/app/component/tests/test_requirepermissions.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/component/tests/test_requirepermissions.py:1.1 Mon May 12 12:32:40 2003
+++ Zope3/src/zope/app/component/tests/test_requirepermissions.py Sat Jun 7 02:37:21 2003
@@ -22,6 +22,7 @@
import zope.app.component
import zope.app.security
import zope.configuration
+from zope.interface import implements
# So we can use config parser to exercise protectClass stuff.
from zope.configuration.xmlconfig import XMLConfig
@@ -56,7 +57,7 @@
def m2(self):
return "m2"
class C(B):
- __implements__ = module.I
+ implements(module.I)
def m3(self):
return "m3"
def m4(self):
=== Zope3/src/zope/app/component/tests/test_servicemanagercontainer.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/component/tests/test_servicemanagercontainer.py:1.6 Tue May 27 10:18:12 2003
+++ Zope3/src/zope/app/component/tests/test_servicemanagercontainer.py Sat Jun 7 02:37:21 2003
@@ -23,10 +23,11 @@
from zope.component.exceptions import ComponentLookupError
from zope.interface.verify import verifyObject
from zope.context import getbaseobject
+from zope.interface import implements
class ServiceManager:
- __implements__ = IServiceService
+ implements(IServiceService)
############################################################
# Implementation methods for interface