0001-workflows-fix-import-of-commentable-action-with-cust.patch
tests/test_workflow_import.py | ||
---|---|---|
381 | 381 |
wf2 = Workflow.import_from_xml_tree(ET.parse(BytesIO(xml_export))) |
382 | 382 |
assert wf2.possible_status[0].items[0].required is False |
383 | 383 | |
384 |
commentable.button_label = 'button label' |
|
385 |
wf2 = assert_import_export_works(wf) |
|
386 |
assert wf2.possible_status[0].items[0].button_label == 'button label' |
|
387 | ||
384 | 388 | |
385 | 389 |
def test_variables_formdef(pub): |
386 | 390 |
wf = Workflow(name='variables') |
wcs/workflows.py | ||
---|---|---|
2293 | 2293 |
el = ET.SubElement(xml_item, 'button_label') |
2294 | 2294 |
else: |
2295 | 2295 |
el = ET.SubElement(xml_item, 'button_label') |
2296 |
if type(self.button_label) is unicode: |
|
2297 |
el.text = self.button_label |
|
2298 |
elif type(self.button_label) is str: |
|
2299 |
el.text = force_text(self.button_label, charset, errors='replace') |
|
2300 |
else: |
|
2301 |
raise AssertionError('unknown type for button_label (%r)' % self.button_label) |
|
2296 |
el.text = self.button_label |
|
2302 | 2297 | |
2303 | 2298 |
def button_label_init_with_xml(self, element, charset, include_id=False): |
2304 | 2299 |
if element is None: |
2305 |
- |