[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content/tests - test_imageupload.py:1.4.44.1

Jim Fulton cvs-admin at zope.org
Sun Nov 9 11:09:05 EST 2003


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

Modified Files:
      Tag: adaptergeddon-branch
	test_imageupload.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/browser/content/tests/test_imageupload.py 1.4 => 1.4.44.1 ===
--- Zope3/src/zope/app/browser/content/tests/test_imageupload.py:1.4	Wed Apr 30 19:37:51 2003
+++ Zope3/src/zope/app/browser/content/tests/test_imageupload.py	Sun Nov  9 11:08:03 2003
@@ -23,14 +23,13 @@
 
 import zope.app.browser.content # for __file__
 
+from zope.app.tests import ztapi
 from zope.app.browser.content.image import ImageUpload
 from zope.app.browser.form.editview import EditView
 from zope.app.browser.form.widget import BytesWidget, BytesAreaWidget
 from zope.app.content.image import Image, IImage
 from zope.app.tests.placelesssetup import PlacelessSetup
-from zope.component.view import provideView, setDefaultViewName
 from zope.publisher.browser import TestRequest
-from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.schema.interfaces import IField, IBytesLine, IBytes
 
 
@@ -44,9 +43,9 @@
         PlacelessSetup.setUp(self)
 
         # Configure the widget views
-        setDefaultViewName(IField, IBrowserPresentation, 'edit')
-        provideView(IBytesLine, 'edit', IBrowserPresentation, BytesWidget)
-        provideView(IBytes, 'edit', IBrowserPresentation, BytesAreaWidget)
+        ztapi.setDefaultViewName(IField, 'edit')
+        ztapi.browserView(IBytesLine, 'edit', BytesWidget)
+        ztapi.browserView(IBytes, 'edit', BytesAreaWidget)
 
         icondir = os.path.split(zope.app.browser.content.__file__)[0]
         data = open(os.path.join(icondir, 'image_icon.gif'), 'rb').read()




More information about the Zope3-Checkins mailing list