[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/tests - test_rolecontents.py:1.5

Steve Alexander steve@cat-box.net
Thu, 5 Jun 2003 08:03:45 -0400


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

Modified Files:
	test_rolecontents.py 
Log Message:
Placeful setup for tests now sets up a  ZopeContainerDecorator.
This means that in such tests, you no longer need to use
ZopeContainerAdapter to get the correct events issued, and perform context-
wrapping duties, when you use a container.
However, it does mean that your tests need to expect these events and
context-wrappers to be used.



=== Zope3/src/zope/app/browser/services/tests/test_rolecontents.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/tests/test_rolecontents.py:1.4	Tue Jun  3 10:42:54 2003
+++ Zope3/src/zope/app/browser/services/tests/test_rolecontents.py	Thu Jun  5 08:03:14 2003
@@ -33,7 +33,12 @@
 class Test(BaseTestContentsBrowserView, unittest.TestCase):
 
     def _TestView__newContext(self):
-        return RoleService()
+        from zope.app.container.sample import SampleContainer
+        from zope.app.content.folder import RootFolder
+        from zope.app.context import ContextWrapper
+        root = RootFolder()
+        container = RoleService()
+        return ContextWrapper(container, root, name='sample')
 
     def _TestView__newView(self, container):
         from zope.publisher.browser import TestRequest