details: http://www.bx.psu.edu/hg/galaxy/rev/c77dea3e745a changeset: 1482:c77dea3e745a user: Greg Von Kuster <greg@bx.psu.edu> date: Tue Aug 26 17:07:44 2008 -0400 description: Fix for new twill version 0.9. 1 file(s) affected in this change: test/base/twilltestcase.py diffs (36 lines): diff -r ed448639d90e -r c77dea3e745a test/base/twilltestcase.py --- a/test/base/twilltestcase.py Tue Aug 26 10:39:47 2008 -0400 +++ b/test/base/twilltestcase.py Tue Aug 26 17:07:44 2008 -0400 @@ -7,7 +7,7 @@ import twill import twill.commands as tc -from twill.other_packages import ClientForm +from twill.other_packages._mechanize_dist import ClientForm from elementtree import ElementTree buffer = StringIO.StringIO() @@ -410,7 +410,10 @@ def submit_form( self, form=1, button="runtool_btn", **kwd ): """Populates and submits a form from the keyword arguments""" #Check for onchange attribute, submit a change if required - for i, control in enumerate(tc.showforms()[form-1].controls): + for i, f in enumerate( tc.showforms() ): + if i == form - 1: + break + for i, control in enumerate( f.controls ): try: if 'refresh_on_change' in control.attrs.keys(): changed = False @@ -456,7 +459,10 @@ if not isinstance(value, list): value = [ value ] - for i, control in enumerate(tc.showforms()[form-1].controls): + for i, f in enumerate( tc.showforms() ): + if i == form - 1: + break + for i, control in enumerate( f.controls ): if control.name == key: control.clear() if control.is_of_kind("text"):