Personal tools
You are here: Home Weblog Archive 2006 October 19 Testing file uploads fields with zope.testbrowser
Document Actions
  • Send this page to somebody
  • Print this page
  • Add Bookmarklet

Testing file uploads fields with zope.testbrowser

by tibi last modified 2006-10-20 07:26
Filed Under:

For some reason, the set_file method is not available for ListControls file upload objects inside the Browser object. To be able to fill in the file field, one needs to do

myfilecontrol.mech_control.set_file(filestream, mimetype, filename).

The problem gets weirder as set_file() is the method indicated by the README.txt doctest of zope.testbrowser package as the way to upload a file stream in a file upload widget, and I presume the README.txt test doesn't fail.

Weblog
Atom
RDF
RSS 2.0
Powered by Quills
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: