[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/configuration/tests - test_editconfiguration.py:1.4
Steve Alexander
steve@cat-box.net
Thu, 5 Jun 2003 08:42:25 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/services/configuration/tests
In directory cvs.zope.org:/tmp/cvs-serv20951/src/zope/app/browser/services/configuration/tests
Modified Files:
test_editconfiguration.py
Log Message:
ZopeContainerAdapter is now no longer used in unit tests.
=== Zope3/src/zope/app/browser/services/configuration/tests/test_editconfiguration.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/configuration/tests/test_editconfiguration.py:1.3 Thu Jun 5 08:03:13 2003
+++ Zope3/src/zope/app/browser/services/configuration/tests/test_editconfiguration.py Thu Jun 5 08:41:54 2003
@@ -23,7 +23,6 @@
from zope.app.browser.services.configuration import EditConfiguration
from zope.app.event.tests.placelesssetup import getEvents
from zope.app.interfaces.container import IContainer
-from zope.app.interfaces.container import IZopeContainer
from zope.app.interfaces.event import IObjectModifiedEvent
from zope.app.interfaces.event import IObjectRemovedEvent
from zope.app.interfaces.services.configuration import Active
@@ -31,19 +30,20 @@
from zope.app.services.tests.placefulsetup import PlacefulSetup
from zope.component.adapter import provideAdapter
from zope.component.view import provideView
-from zope.interface import Interface
+from zope.interface import Interface, implements
from zope.publisher.browser import BrowserView
from zope.publisher.browser import TestRequest
from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.app.context import ContextWrapper
class Container(dict):
- __implements__ = IContainer, IContainmentRoot
+ implements(IContainer, IContainmentRoot)
class I(Interface):
pass
class C:
- __implements__ = I
+ implements(I)
status = Active
@@ -54,7 +54,7 @@
c2 = C()
c7 = C()
d = Container({'1': c1, '2': c2, '7': c7})
-
+ d = ContextWrapper(d, None)
view = EditConfiguration(d, TestRequest())
view.remove_objects(['2', '7'])
self.assertEqual(d, {'1': c1})