[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/tests - test_objectname.py:1.10 test_physicallocationadapters.py:1.11 test_presentation.py:1.5

Steve Alexander steve@cat-box.net
Wed, 4 Jun 2003 04:46:34 -0400


Update of /cvs-repository/Zope3/src/zope/app/traversing/tests
In directory cvs.zope.org:/tmp/cvs-serv23907/src/zope/app/traversing/tests

Modified Files:
	test_objectname.py test_physicallocationadapters.py 
	test_presentation.py 
Log Message:
new style implements()


=== Zope3/src/zope/app/traversing/tests/test_objectname.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/traversing/tests/test_objectname.py:1.9	Sun Jun  1 11:59:38 2003
+++ Zope3/src/zope/app/traversing/tests/test_objectname.py	Wed Jun  4 04:46:33 2003
@@ -17,7 +17,7 @@
 $Id$
 """
 from unittest import TestCase, main, makeSuite
-from zope.interface import Interface
+from zope.interface import Interface, implements
 
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.component import getService, getAdapter
@@ -30,7 +30,7 @@
 class IRoot(Interface): pass
 
 class Root:
-    __implements__ = IRoot
+    implements(IRoot)
 
 class TrivialContent(object):
     """Trivial content object, used because instances of object are rocks."""


=== Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py:1.10	Sun Jun  1 11:59:38 2003
+++ Zope3/src/zope/app/traversing/tests/test_physicallocationadapters.py	Wed Jun  4 04:46:33 2003
@@ -19,6 +19,7 @@
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.component.adapter import provideAdapter
 from zope.component import getAdapter
+from zope.interface import implements
 
 from zope.app.interfaces.traversing import IContainmentRoot
 from zope.app.interfaces.traversing import IPhysicallyLocatable
@@ -26,8 +27,11 @@
 from zope.app.traversing.adapters import RootPhysicallyLocatable
 from zope.app.context import ContextWrapper
 
-class Root: __implements__ = IContainmentRoot
-class C: pass
+class Root:
+    implements(IContainmentRoot)
+
+class C:
+    pass
 
 class Test(PlacelessSetup, TestCase):
 


=== Zope3/src/zope/app/traversing/tests/test_presentation.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/traversing/tests/test_presentation.py:1.4	Thu May  1 15:35:38 2003
+++ Zope3/src/zope/app/traversing/tests/test_presentation.py	Wed Jun  4 04:46:33 2003
@@ -22,20 +22,25 @@
 from zope.component.view import provideView
 from zope.component.resource import provideResource
 from zope.app.traversing.namespace import view, resource
-from zope.interface import Interface
+from zope.interface import Interface, implements
 
-class IContent(Interface): pass
-class IPresentationType(Interface): pass
+class IContent(Interface):
+    pass
 
-class Content: __implements__ = IContent
+class IPresentationType(Interface):
+    pass
+
+class Content:
+    implements(IContent)
 
 class Resource:
+    implements(IPresentationType)
 
-    def __init__(self, request): pass
-    __implements__ = IPresentationType
+    def __init__(self, request):
+        pass
 
 class View:
-    __implements__ = IPresentationType
+    implements(IPresentationType)
 
     def __init__(self, content, request):
         self.content = content