[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testZSP.py:1.1.2.11

Casey Duncan casey@zope.com
Thu, 28 Mar 2002 15:52:24 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv29399

Modified Files:
      Tag: Zope-3x-branch
	testZSP.py 
Log Message:
Updated security test to provide memento adapter


=== Zope3/lib/python/Zope/App/Security/tests/testZSP.py 1.1.2.10 => 1.1.2.11 ===
 from Zope.App.Security.IPrincipalRoleManager import IPrincipalRoleManager 
 from Zope.Exceptions import Unauthorized, Forbidden
+from Zope.App.OFS.Memento.IAttributeMementoStorable \
+     import IAttributeMementoStorable
+from Zope.App.OFS.Memento.IMementoBag import IMementoBag
+from Zope.App.OFS.Memento.AttributeMementoBag import AttributeMementoBag
 from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup
 
 class Context:
@@ -61,6 +65,8 @@
 class Test(CleanUp, unittest.TestCase):
 
     def setUp(self):
+        provideAdapter(IAttributeMementoStorable, IMementoBag, 
+                       AttributeMementoBag)    
         jim = principalRegistry.definePrincipal('jim', 'Jim', 'Jim Fulton',
                                                 'jim', '123')
         self.jim = jim.getId()
@@ -240,7 +246,7 @@
                           self.policy.validate,
                           'x', Unprotected(), Context(self.tim))
 
-class ITest(Interface):
+class ITest(IAttributeMementoStorable):
     pass
 
 class TestClass: