[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/tests - test_traverser.py:1.14.18.2

Marius Gedminas marius at pov.lt
Fri Mar 19 13:51:24 EST 2004


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

Modified Files:
      Tag: mgedmin-events2-branch
	test_traverser.py 
Log Message:
Added IParticipation and replaced the lists of principals in IInteraction with
a list of participations.  Made BaseRequest an IParticipation and replaced
request.user with request.principal everywhere.



=== Zope3/src/zope/app/traversing/tests/test_traverser.py 1.14.18.1 => 1.14.18.2 ===
--- Zope3/src/zope/app/traversing/tests/test_traverser.py:1.14.18.1	Mon Mar  8 13:43:41 2004
+++ Zope3/src/zope/app/traversing/tests/test_traverser.py	Fri Mar 19 13:50:50 2004
@@ -42,6 +42,14 @@
 from zope.security.management import newInteraction, getInteraction
 from zope.app.container.contained import Contained, contained
 
+
+class ParticipationStub:
+
+    def __init__(self, principal):
+        self.principal = principal
+        self.interaction = None
+
+
 class C(Contained):
     def __init__(self, name):
         self.name = name
@@ -181,8 +189,7 @@
         self.assertEquals(tr.traverse(('folder', 'item')), item)
 
     def testItemDenied(self):
-        newInteraction(None)
-        getInteraction().add('no one')
+        newInteraction(ParticipationStub('no one'))
         defineChecker(C, Denied('item'))
         tr = Traverser(ProxyFactory(self.root, interaction=getInteraction()))
         folder = self.folder




More information about the Zope3-Checkins mailing list