Commit 84c8a0c3 authored by Jérome Perrin's avatar Jérome Perrin

check that activate_kw=dict(tag=this_tag) parameter to newContent create reindexing activities

with this tag.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13226 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d92dcfa1
......@@ -1632,6 +1632,22 @@ class TestCMFActivity(ERP5TypeTestCase):
LOG('Testing... ',0,message)
self.TryFlushActivityWithAfterTag('SQLQueue')
def test_76_ActivateKwForNewContent(self, quiet=0, run=run_all_test):
if not run: return
if not quiet:
message = '\nCheck reindex message uses activate_kw passed to newContent'
ZopeTestCase._print(message)
LOG('Testing... ',0,message)
o1 = self.getOrganisationModule().newContent(
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')
if __name__ == '__main__':
framework()
......
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