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

Garrett Smith garrett at mojave-corp.com
Thu Feb 26 00:11:19 EST 2004


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

Modified Files:
      Tag: garrett-widgets2-branch
	test_imageupload.py 
Log Message:
Yet another branch for widgets refactoring (YABFWR).


=== Zope3/src/zope/app/browser/content/tests/test_imageupload.py 1.6 => 1.6.20.1 ===
--- Zope3/src/zope/app/browser/content/tests/test_imageupload.py:1.6	Thu Nov 27 08:59:12 2003
+++ Zope3/src/zope/app/browser/content/tests/test_imageupload.py	Thu Feb 26 00:10:48 2004
@@ -31,6 +31,7 @@
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.publisher.browser import TestRequest
 from zope.schema.interfaces import IField, IBytesLine, IBytes
+from zope.app.interfaces.form import IEditWidget
 
 
 class IU(ImageUpload, EditView):
@@ -43,9 +44,8 @@
         super(Test, self).setUp()
 
         # Configure the widget views
-        ztapi.setDefaultViewName(IField, 'edit')
-        ztapi.browserView(IBytesLine, 'edit', BytesWidget)
-        ztapi.browserView(IBytes, 'edit', BytesAreaWidget)
+        ztapi.browserViewProviding(IBytesLine, BytesWidget, IEditWidget)
+        ztapi.browserViewProviding(IBytes, BytesAreaWidget, IEditWidget)
 
         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