[Zope3-checkins] CVS: Zope3/src/zope/app/browser/tests - test_menu.py:1.10.18.2

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


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

Modified Files:
      Tag: mgedmin-events2-branch
	test_menu.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/browser/tests/test_menu.py 1.10.18.1 => 1.10.18.2 ===
--- Zope3/src/zope/app/browser/tests/test_menu.py:1.10.18.1	Mon Mar  8 13:43:35 2004
+++ Zope3/src/zope/app/browser/tests/test_menu.py	Fri Mar 19 13:50:33 2004
@@ -70,6 +70,13 @@
         pass
 
 
+class ParticipationStub:
+
+    def __init__(self, principal):
+        self.principal = principal
+        self.interaction = None
+
+
 class Test(PlacefulSetup, unittest.TestCase):
 
     def setUp(self):
@@ -87,8 +94,7 @@
                                       abad='waaa'))
 
     def test(self):
-        newInteraction(None)
-        getInteraction().add('who')
+        newInteraction(ParticipationStub('who'))
         v = MenuAccessView(ProxyFactory(ob), TestRequest())
         self.assertEqual(v['zmi_views'],
                          [{'description': '', 'title':'l1', 'action':'a1'},




More information about the Zope3-Checkins mailing list