[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container/tests - test_contents.py:1.16
Jim Fulton
jim@zope.com
Thu, 29 May 2003 14:16:14 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/container/tests
In directory cvs.zope.org:/tmp/cvs-serv29900/src/zope/app/browser/container/tests
Modified Files:
test_contents.py
Log Message:
Added a stub principal to the copy tests, since we need a principal to
do copy and paste.
=== Zope3/src/zope/app/browser/container/tests/test_contents.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/browser/container/tests/test_contents.py:1.15 Wed May 28 11:46:00 2003
+++ Zope3/src/zope/app/browser/container/tests/test_contents.py Thu May 29 14:16:13 2003
@@ -179,6 +179,12 @@
__implements__ = IDocument
+class Principal:
+
+ def getId(self):
+ return 'bob'
+
+
class TestCutCopyPaste(PlacefulSetup, TestCase):
def setUp(self):
@@ -297,7 +303,9 @@
def _TestView__newView(self, container):
from zope.app.browser.container.contents import Contents
from zope.publisher.browser import TestRequest
- return Contents(container, TestRequest())
+ request = TestRequest()
+ request.user = Principal()
+ return Contents(container, request)
class Test(BaseTestContentsBrowserView, TestCase):