[Zope3-checkins] CVS: Zope3/src/zope/app/security/tests - test_ftpauth.py:1.2 test_protectclass.py:1.4 test_zopepolicy.py:1.13

Steve Alexander steve@cat-box.net
Sat, 7 Jun 2003 01:46:07 -0400


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

Modified Files:
	test_ftpauth.py test_protectclass.py test_zopepolicy.py 
Log Message:
more new-style implements declarations


=== Zope3/src/zope/app/security/tests/test_ftpauth.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/security/tests/test_ftpauth.py:1.1	Mon Feb  3 10:08:46 2003
+++ Zope3/src/zope/app/security/tests/test_ftpauth.py	Sat Jun  7 01:46:06 2003
@@ -18,11 +18,12 @@
 from unittest import TestCase, TestSuite, main, makeSuite
 from zope.publisher.interfaces.ftp import IFTPCredentials
 from zope.app.security.ftpauth import FTPAuth
+from zope.interface import implements
 
 class FTPCredentials:
     __doc__ = IFTPCredentials.__doc__
 
-    __implements__ =  IFTPCredentials
+    implements(IFTPCredentials)
 
     def __init__(self, credentials):
         self.credentials = credentials


=== Zope3/src/zope/app/security/tests/test_protectclass.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/security/tests/test_protectclass.py:1.3	Thu May  1 15:35:34 2003
+++ Zope3/src/zope/app/security/tests/test_protectclass.py	Sat Jun  7 01:46:06 2003
@@ -20,6 +20,7 @@
 from zope.testing.cleanup import CleanUp # Base class w registry cleanup
 from zope.app.security.protectclass import protectName, protectLikeUnto
 from zope.app.security.protectclass import protectSetAttribute
+from zope.interface import implements
 
 NOTSET = []
 
@@ -38,7 +39,7 @@
             def m2(self):
                 return "m2"
         class C(B):
-            __implements__ = I
+            implements(I)
             def m3(self):
                 return "m3"
             def m4(self):


=== Zope3/src/zope/app/security/tests/test_zopepolicy.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/security/tests/test_zopepolicy.py:1.12	Mon Jun  2 12:55:49 2003
+++ Zope3/src/zope/app/security/tests/test_zopepolicy.py	Sat Jun  7 01:46:06 2003
@@ -20,6 +20,7 @@
 import unittest
 
 from zope.component.service import serviceManager as services
+from zope.interface import implements
 
 from zope.app.interfaces.security import IPermissionService
 from zope.app.interfaces.security import IRoleService
@@ -49,8 +50,7 @@
 from zope.app.interfaces.annotation import IAttributeAnnotatable
 from zope.app.interfaces.annotation import IAnnotations
 from zope.app.attributeannotations import AttributeAnnotations
-from zope.app.services.tests.placefulsetup\
-           import PlacefulSetup
+from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.security.zopepolicy import permissionsOfPrincipal
 
 class Context:
@@ -133,7 +133,8 @@
 
         # ... and assign roles to principals
         principalRoleManager.assignRoleToPrincipal(self.peon, self.jim.getId())
-        principalRoleManager.assignRoleToPrincipal(self.manager, self.tim.getId())
+        principalRoleManager.assignRoleToPrincipal(self.manager,
+                                                   self.tim.getId())
 
         self.policy = self._makePolicy()
 
@@ -313,7 +314,7 @@
     pass
 
 class TestClass:
-    __implements__ = ITest
+    implements(ITest)
 
     def __init__(self):
         self._roles       = { 'test' : {} }