[Zope3-checkins]
CVS: Zope3/src/zope/app/browser/services/registration/tests
- test_componentpathwidget.py:1.2.6.1
test_editregistration.py:1.2.6.1
Jim Fulton
jim at zope.com
Mon Sep 8 15:22:00 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/services/registration/tests
In directory cvs.zope.org:/tmp/cvs-serv20092/src/zope/app/browser/services/registration/tests
Modified Files:
Tag: parentgeddon-branch
test_componentpathwidget.py test_editregistration.py
Log Message:
Checking in work in progress on parentgeddon-branch so Fred can help
me to get the tests passing. Specific log entries will be provided
when we merge this into the head.
=== Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py:1.2 Sun Aug 17 02:05:55 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_componentpathwidget.py Mon Sep 8 14:21:29 2003
@@ -19,24 +19,24 @@
import unittest
from zope.app.browser.services.registration import ComponentPathWidget
-from zope.app.context import ContextWrapper
from zope.app.interfaces.services.registration import IComponentRegistration
-from zope.app.interfaces.traversing import ITraverser, \
- ITraversable, IPhysicallyLocatable
+from zope.app.interfaces.traversing import IPhysicallyLocatable
+from zope.app.interfaces.traversing import ITraverser, ITraversable
from zope.app.services.field import ComponentPath
-from zope.app.traversing.adapters import \
- Traverser, DefaultTraversable, WrapperPhysicallyLocatable
+from zope.app.location import LocationPhysicallyLocatable
+from zope.app.traversing.adapters import Traverser, DefaultTraversable
from zope.component.adapter import provideAdapter
from zope.component.view import provideView
from zope.component.tests.placelesssetup import PlacelessSetup
from zope.interface import implements, Interface
from zope.publisher.browser import TestRequest, BrowserView
from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.app.container.contained import Contained
class Component:
implements(Interface)
-class Registration:
+class Registration(Contained):
implements(IComponentRegistration)
path = 'foo'
@@ -55,13 +55,13 @@
PlacelessSetup.setUp(self)
provideAdapter(None, ITraverser, Traverser)
provideAdapter(None, ITraversable, DefaultTraversable)
- provideAdapter(None, IPhysicallyLocatable, WrapperPhysicallyLocatable)
+ provideAdapter(None, IPhysicallyLocatable, LocationPhysicallyLocatable)
provideView(Interface, "absolute_url", IBrowserPresentation,
AbsoluteURL)
field = ComponentPath(None, title=u"Path")
field.__name__ = u'path'
- reg = ContextWrapper(Registration(), None, name="reg")
+ reg = Registration()
field = field.bind(reg)
self.widget = ComponentPathWidget(field, TestRequest())
@@ -75,7 +75,8 @@
def test_getInputValue(self):
self.assertEqual(self.widget.getInputValue(), 'foo')
- comp = ContextWrapper(Component(), None, name="path2")
+ comp = Component()
+ comp.__name__ = "path2"
self.widget.context.context = comp
self.assertEqual(self.widget.getInputValue(), 'path2')
@@ -83,7 +84,8 @@
self.assertEqual(
self.widget(),
'<a href="something/@@SelectedManagementView.html">foo</a>')
- comp = ContextWrapper(Component(), None, name="path2")
+ comp = Component()
+ comp.__name__ = "path2"
self.widget.context.context = comp
self.assertEqual(
self.widget(),
=== Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py:1.2 Sun Aug 17 02:05:55 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_editregistration.py Mon Sep 8 14:21:29 2003
@@ -32,7 +32,6 @@
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)
@@ -52,7 +51,6 @@
c2 = C()
c7 = C()
d = Container({'1': c1, '2': c2, '7': c7})
- d = ContextWrapper(d, None)
view = EditRegistration(d, TestRequest())
view.remove_objects(['2', '7'])
self.assertEqual(d, {'1': c1})
More information about the Zope3-Checkins
mailing list