[Zope3-checkins] CVS: Zope3/src/zope/app/file/browser/tests -
test_imageupload.py:1.3
Garrett Smith
garrett at mojave-corp.com
Fri Mar 5 23:17:54 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/file/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv15646/src/zope/app/file/browser/tests
Modified Files:
test_imageupload.py
Log Message:
Merged changes from garrett-widgets2-branch:
- Changed the way widgets are looked up to use interfaces instead of
names.
- Refactor of zope/app/form/utility.py -- see
http://dev.zope.org/Zope3/WidgetsAndMultiwayAdapters
for details.
- Moved configuration of vocab widgets to its own zcml file
(zope/app/browser/form/vocabularywidget.zcml).
- Removed 'propertyNames' and 'getValue' from widgets. This is replaced
by accessing the widget attributes directly.
- Deleted depreated methods from widget interface: haveData and getData.
=== Zope3/src/zope/app/file/browser/tests/test_imageupload.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/file/browser/tests/test_imageupload.py:1.2 Tue Feb 24 11:49:49 2004
+++ Zope3/src/zope/app/file/browser/tests/test_imageupload.py Fri Mar 5 23:17:23 2004
@@ -24,6 +24,7 @@
from zope.app.tests import ztapi
from zope.app.browser.form.editview import EditView
from zope.app.browser.form.widget import BytesWidget, BytesAreaWidget
+from zope.app.interfaces.form import IInputWidget
from zope.app.tests.placelesssetup import PlacelessSetup
from zope.publisher.browser import TestRequest
from zope.schema.interfaces import IField, IBytesLine, IBytes
@@ -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, IInputWidget)
+ ztapi.browserViewProviding(IBytes, BytesAreaWidget, IInputWidget)
icondir = os.path.split(zope.app.file.browser.__file__)[0]
data = open(os.path.join(icondir, 'image_icon.gif'), 'rb').read()
More information about the Zope3-Checkins
mailing list