Commit b3d8d30c authored by Aurel's avatar Aurel

test activate_kw is propagated to activity when calling worklfow

method with it


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16510 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6ed24e3
...@@ -1862,6 +1862,27 @@ class TestCMFActivity(ERP5TypeTestCase): ...@@ -1862,6 +1862,27 @@ class TestCMFActivity(ERP5TypeTestCase):
self.assertEquals(len(message_list), 0) self.assertEquals(len(message_list), 0)
def test_81_ActivateKwForWorkflowTransition(self, quiet=0, run=run_all_test):
"""
Test call of a workflow transition with activate_kw parameter propagate them
"""
if not run: return
if not quiet:
message = '\nCheck reindex message uses activate_kw passed to workflow transition'
ZopeTestCase._print(message)
LOG('Testing... ',0,message)
o1 = self.getOrganisationModule().newContent()
get_transaction().commit()
self.tic()
o1.validate(activate_kw=dict(tag='The Tag'))
get_transaction().commit()
messages_for_o1 = [m for m in self.getActivityTool().getMessageList()
if m.object_path == o1.getPhysicalPath()]
self.assertNotEquals(0, len(messages_for_o1))
for m in messages_for_o1:
self.assertEquals(m.activity_kw.get('tag'), 'The Tag')
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestCMFActivity)) suite.addTest(unittest.makeSuite(TestCMFActivity))
......
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