Commit 37d53d46 authored by Jérome Perrin's avatar Jérome Perrin

ui_test: pylint py3

parent 8ddbc859
...@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow') ...@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow')
result = 'OK' result = 'OK'
error_list = [] error_list = []
def assertEquals(a, b, msg=''): def assertEqual(a, b, msg=''):
if a != b: if a != b:
if msg: if msg:
error_list.append(msg) error_list.append(msg)
...@@ -17,25 +17,25 @@ def assertEquals(a, b, msg=''): ...@@ -17,25 +17,25 @@ def assertEquals(a, b, msg=''):
error_list.append('%r != %r' % (a, b)) error_list.append('%r != %r' % (a, b))
foo_2 = foo_module['2'] foo_2 = foo_module['2']
assertEquals(foo_2.getSimulationState(), 'validated', assertEqual(foo_2.getSimulationState(), 'validated',
'Foo 2 state is %s' % foo_2.getSimulationState()) 'Foo 2 state is %s' % foo_2.getSimulationState())
if not error_list: if not error_list:
assertEquals( assertEqual(
wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['comment'], wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['comment'],
'Comment !') 'Comment !')
assertEquals( assertEqual(
wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['custom_workflow_variable'], wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['custom_workflow_variable'],
'Custom Workflow Variable') 'Custom Workflow Variable')
foo_3 = foo_module['3'] foo_3 = foo_module['3']
assertEquals(foo_3.getSimulationState(), 'validated', assertEqual(foo_3.getSimulationState(), 'validated',
'Foo 3 state is %s' % foo_3.getSimulationState()) 'Foo 3 state is %s' % foo_3.getSimulationState())
if not error_list: if not error_list:
assertEquals( assertEqual(
wtool.getInfoFor(foo_3, 'history', wf_id='foo_workflow')[-2]['comment'], wtool.getInfoFor(foo_3, 'history', wf_id='foo_workflow')[-2]['comment'],
'Comment !') 'Comment !')
assertEquals( assertEqual(
wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['custom_workflow_variable'], wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['custom_workflow_variable'],
'Custom Workflow Variable') 'Custom Workflow Variable')
......
...@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow') ...@@ -9,7 +9,7 @@ wtool = getToolByName(context, 'portal_workflow')
result = 'OK' result = 'OK'
error_list = [] error_list = []
def assertEquals(a, b, msg=''): def assertEqual(a, b, msg=''):
if a != b: if a != b:
if msg: if msg:
error_list.append(msg) error_list.append(msg)
...@@ -17,18 +17,18 @@ def assertEquals(a, b, msg=''): ...@@ -17,18 +17,18 @@ def assertEquals(a, b, msg=''):
error_list.append('%r != %r' % (a, b)) error_list.append('%r != %r' % (a, b))
foo_2 = foo_module['2'] foo_2 = foo_module['2']
assertEquals(foo_2.getSimulationState(), 'validated', assertEqual(foo_2.getSimulationState(), 'validated',
'Foo 2 state is %s' % foo_2.getSimulationState()) 'Foo 2 state is %s' % foo_2.getSimulationState())
if not error_list: if not error_list:
assertEquals( assertEqual(
wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['comment'], wtool.getInfoFor(foo_2, 'history', wf_id='foo_workflow')[-2]['comment'],
'Comment !') 'Comment !')
foo_3 = foo_module['3'] foo_3 = foo_module['3']
assertEquals(foo_3.getSimulationState(), 'validated', assertEqual(foo_3.getSimulationState(), 'validated',
'Foo 3 state is %s' % foo_3.getSimulationState()) 'Foo 3 state is %s' % foo_3.getSimulationState())
if not error_list: if not error_list:
assertEquals( assertEqual(
wtool.getInfoFor(foo_3, 'history', wf_id='foo_workflow')[-2]['comment'], wtool.getInfoFor(foo_3, 'history', wf_id='foo_workflow')[-2]['comment'],
'Comment !') 'Comment !')
......
...@@ -10,7 +10,7 @@ wtool = getToolByName(context, 'portal_workflow') ...@@ -10,7 +10,7 @@ wtool = getToolByName(context, 'portal_workflow')
result = 'OK' result = 'OK'
error_list = [] error_list = []
def assertEquals(a, b, msg=''): def assertEqual(a, b, msg=''):
if a != b: if a != b:
if msg: if msg:
error_list.append(msg) error_list.append(msg)
...@@ -18,15 +18,15 @@ def assertEquals(a, b, msg=''): ...@@ -18,15 +18,15 @@ def assertEquals(a, b, msg=''):
error_list.append('%r != %r' % (a, b)) error_list.append('%r != %r' % (a, b))
foo_2 = foo_module['2'] foo_2 = foo_module['2']
assertEquals(foo_2.getSimulationState(), 'draft', assertEqual(foo_2.getSimulationState(), 'draft',
'Foo 2 state is %s' % foo_2.getSimulationState()) 'Foo 2 state is %s' % foo_2.getSimulationState())
foo_3 = foo_module['3'] foo_3 = foo_module['3']
assertEquals(foo_3.getSimulationState(), 'validated', assertEqual(foo_3.getSimulationState(), 'validated',
'Foo 3 state is %s' % foo_3.getSimulationState()) 'Foo 3 state is %s' % foo_3.getSimulationState())
if not error_list: if not error_list:
assertEquals( assertEqual(
wtool.getInfoFor(foo_3, 'history', wf_id='foo_workflow')[-2]['comment'], wtool.getInfoFor(foo_3, 'history', wf_id='foo_workflow')[-2]['comment'],
'Comment !') 'Comment !')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment