[Zope3-checkins] CVS: Zope3/src/zope/app/form/tests -
test_utility.py:1.16.12.1
test_widget_geddon_deprecations.py:1.2.12.1
Jim Fulton
cvs-admin at zope.org
Sun Nov 9 11:08:49 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/form/tests
In directory cvs.zope.org:/tmp/cvs-serv15349/src/zope/app/form/tests
Modified Files:
Tag: adaptergeddon-branch
test_utility.py test_widget_geddon_deprecations.py
Log Message:
Created a global presentation service that replaces the
global view, resource, and skin services.
Now look up presentation components by adapting from a request type,
rather than adapting to a presentation type.
=== Zope3/src/zope/app/form/tests/test_utility.py 1.16 => 1.16.12.1 ===
--- Zope3/src/zope/app/form/tests/test_utility.py:1.16 Wed Aug 13 17:28:38 2003
+++ Zope3/src/zope/app/form/tests/test_utility.py Sun Nov 9 11:08:17 2003
@@ -19,14 +19,13 @@
"""
from unittest import TestCase, TestSuite, main, makeSuite
+from zope.app.tests import ztapi
from zope.app.tests.placelesssetup import PlacelessSetup
from zope.publisher.browser import BrowserView
from zope.publisher.browser import TestRequest
-from zope.publisher.interfaces.browser import IBrowserPresentation
from zope.interface import Interface, directlyProvides, implements
from zope.schema import Text, accessors
from zope.app.browser.form.widget import TextWidget
-from zope.component.view import provideView, setDefaultViewName
from zope.schema.interfaces import IText
from zope.app.interfaces.form import WidgetsError
from zope.app.form.utility import setUpWidget, setUpWidgets, setUpEditWidgets
@@ -116,8 +115,8 @@
def setUp(self):
PlacelessSetup.setUp(self)
- setDefaultViewName(IText, IBrowserPresentation, 'edit')
- provideView(IText, 'edit', IBrowserPresentation, W)
+ ztapi.setDefaultViewName(IText, 'edit')
+ ztapi.browserView(IText, 'edit', W)
def test_setUpWidget(self):
=== Zope3/src/zope/app/form/tests/test_widget_geddon_deprecations.py 1.2 => 1.2.12.1 ===
--- Zope3/src/zope/app/form/tests/test_widget_geddon_deprecations.py:1.2 Wed Aug 13 17:28:38 2003
+++ Zope3/src/zope/app/form/tests/test_widget_geddon_deprecations.py Sun Nov 9 11:08:18 2003
@@ -16,6 +16,7 @@
$Id$
"""
+from zope.app.tests import ztapi
from zope.testing.doctestunit import DocTestSuite
from zope.publisher.browser import TestRequest
from zope.app.form import utility
@@ -23,8 +24,6 @@
from zope.schema import Text
from zope.schema.interfaces import IText
from zope.app.tests.placelesssetup import setUp, tearDown
-from zope.component.view import provideView
-from zope.publisher.interfaces.browser import IBrowserPresentation
import warnings
class TestWidget(Widget):
@@ -127,7 +126,7 @@
>>> utility.warn = fakewarn
>>> setUp()
- >>> provideView(IText, 'test', IBrowserPresentation, TestWidget)
+ >>> ztapi.browserView(IText, 'test', TestWidget)
>>> request = TestRequest()
>>> view = TestView(None, request)
More information about the Zope3-Checkins
mailing list