[Zope3-checkins] CVS: Zope3/src/zope/app/security/registries/tests - test_principalregistry.py:1.6.10.1
Grégoire Weber
zope@i-con.ch
Sun, 22 Jun 2003 10:23:56 -0400
Update of /cvs-repository/Zope3/src/zope/app/security/registries/tests
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/app/security/registries/tests
Modified Files:
Tag: cw-mail-branch
test_principalregistry.py
Log Message:
Synced up with HEAD
=== Zope3/src/zope/app/security/registries/tests/test_principalregistry.py 1.6 => 1.6.10.1 ===
--- Zope3/src/zope/app/security/registries/tests/test_principalregistry.py:1.6 Thu May 1 15:35:33 2003
+++ Zope3/src/zope/app/security/registries/tests/test_principalregistry.py Sun Jun 22 10:23:25 2003
@@ -14,17 +14,17 @@
import unittest
from zope.app.security.registries.principalregistry import PrincipalRegistry
-from zope.app.security.registries.principalregistry \
- import DuplicateLogin, DuplicateId
+from zope.app.security.registries.principalregistry import DuplicateLogin
+from zope.app.security.registries.principalregistry import DuplicateId
from zope.exceptions import NotFoundError
from zope.publisher.interfaces.http import IHTTPCredentials
-from zope.app.services.tests.placefulsetup \
- import PlacefulSetup
+from zope.app.services.tests.placefulsetup import PlacefulSetup
from zope.app.services.servicenames import Adapters
+from zope.interface import implements
class Request:
- __implements__ = IHTTPCredentials
+ implements(IHTTPCredentials)
def __init__(self, lpw):
self.__lpw = lpw
@@ -60,12 +60,10 @@
self.assertEqual(p.getId(), '1')
self.assertEqual(p.getTitle(), 'Tim Peters')
self.assertEqual(p.getDescription(), 'Sir Tim Peters')
- self.assertEqual(p.getRoles(), ())
p = self.reg.getPrincipal('2')
self.assertEqual(p.getId(), '2')
self.assertEqual(p.getTitle(), 'Jim Fulton')
self.assertEqual(p.getDescription(), 'Sir Jim Fulton')
- self.assertEqual(p.getRoles(), ())
self.assertEqual(len(self.reg.getPrincipals('')), 2)
@@ -140,7 +138,6 @@
p = self.reg.getPrincipal("anybody")
self.assertEquals(p.getId(), "anybody")
self.assertEquals(p.getTitle(), "Default Principal")
- self.assertEquals(p.getRoles(), ())
self.assertRaises(DuplicateId, self.reg.definePrincipal,
"anybody", "title")