Test fixes.

This commit is contained in:
James Taylor
2007-10-30 07:04:46 +00:00
parent c24c2b7491
commit 575d2d2ffb
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -493,7 +493,7 @@ class SelectToolParameter( ToolParameter ):
if self.is_dynamic and trans.workflow_building_mode:
# Really the best we can do?
return None
options = self.get_options( trans, context )
options = list( self.get_options( trans, context ) )
value = [ optval for _, optval, selected in options if selected ]
if len( value ) == 0:
if not self.multiple and options:
+2 -2
View File
@@ -360,7 +360,7 @@ class TwillTestCase( unittest.TestCase ):
#Check for onchange attribute, submit a change if required
for i, control in enumerate(tc.showforms()[form-1].controls):
try:
if 'onchange' in control.attrs.keys():
if 'refresh_on_change' in control.attrs.keys():
changed = False
for elem in kwd[control.name]:
"""
@@ -370,7 +370,7 @@ class TwillTestCase( unittest.TestCase ):
param_text = ''
for param in tc.show().split('<select') :
param = ('<select' + param.split('select>')[0] + 'select>').replace('selected', 'selected="yes"')
if param.find('onchang') != -1 and param.find('name="%s"' % control.name) != -1:
if param.find('on_chang') != -1 and param.find('name="%s"' % control.name) != -1:
tree = ElementTree.fromstring(param)
for option in tree.findall('option') :
if option.get('value') in control.value: