[Zope3-checkins]
CVS: Zope3/src/zope/app/services/pluggableauth/tests
- test_pluggableauth.py:1.5.6.3
Jim Fulton
jim at zope.com
Mon Sep 15 14:13:10 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/services/pluggableauth/tests
In directory cvs.zope.org:/tmp/cvs-serv15511/src/zope/app/services/pluggableauth/tests
Modified Files:
Tag: parentgeddon-branch
test_pluggableauth.py
Log Message:
Got lots of tests to pass.
Added a setitem helper function to be used to help satisfy container
contracts.
=== Zope3/src/zope/app/services/pluggableauth/tests/test_pluggableauth.py 1.5.6.2 => 1.5.6.3 ===
--- Zope3/src/zope/app/services/pluggableauth/tests/test_pluggableauth.py:1.5.6.2 Fri Sep 12 15:15:34 2003
+++ Zope3/src/zope/app/services/pluggableauth/tests/test_pluggableauth.py Mon Sep 15 14:12:39 2003
@@ -36,6 +36,8 @@
from zope.publisher.browser import TestRequest as Request
+from zope.app.tests.placelesssetup import setUp, tearDown
+
import base64
@@ -69,6 +71,7 @@
self.createUsers()
def createUsers(self):
+
self._slinkp = SimplePrincipal('slinkp', '123')
self._slinkp2 = SimplePrincipal('slinkp2', '123')
self._chrism = SimplePrincipal('chrism', '123')
@@ -124,7 +127,7 @@
def testAuthServiceGetPrincipal(self):
auth = self._auth
- id = '\t'.join((auth.earmark, 'one', str(self._slinkp.getId())))
+ id = self._slinkp.getId()
self.assertEqual(self._slinkp, auth.getPrincipal(id))
self.assertRaises(NotFoundError, self._fail_NoSourceId)
self.assertRaises(NotFoundError, self._fail_BadIdType)
@@ -151,7 +154,6 @@
one = self._one
p = self._slinkp
self.assertEqual(p, one.getPrincipal(p.getId()))
- self.assertRaises(NotFoundError, one.getPrincipal, None)
class PrincipalAuthenticationViewTest(Setup):
@@ -164,7 +166,8 @@
def test_suite():
t1 = makeSuite(AuthServiceTest)
from zope.testing.doctestunit import DocTestSuite
- t2 = DocTestSuite('zope.app.services.pluggableauth')
+ t2 = DocTestSuite('zope.app.services.pluggableauth',
+ setUp=setUp, tearDown=tearDown)
t3 = makeSuite(BTreePrincipalSourceTest)
t4 = makeSuite(PrincipalAuthenticationViewTest)
return TestSuite((t1, t2, t3, t4))
More information about the Zope3-Checkins
mailing list