From 1bdd03fe1ea287e71aa73cd17949affcc09831e9 Mon Sep 17 00:00:00 2001 From: Tatuya Kamada <tatuya@nexedi.com> Date: Thu, 7 Jan 2010 12:02:57 +0000 Subject: [PATCH] Confirm r31623 fixing. Test notification message when re-assigning. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31625 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testBug.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/product/ERP5/tests/testBug.py b/product/ERP5/tests/testBug.py index 6829ed9670..504fbc83e4 100644 --- a/product/ERP5/tests/testBug.py +++ b/product/ERP5/tests/testBug.py @@ -292,6 +292,19 @@ class TestBug(ERP5TypeTestCase): self.failUnless( bug_message.getStartDate() is not None) #self.assertEquals(bug_message.getSourceValue().getTitle(), 'dummy') + def stepCheckBugMessageNotificationReAssign(self, sequence=None, sequence_list=None, **kw): + """ + Check the bug message when re-assign + """ + last_message = self.portal.MailHost._last_message + self.assertNotEquals((), last_message) + mfrom, mto, messageText = last_message + from email.Parser import Parser + p = Parser() + m = p.parsestr(messageText) + self.assertTrue('Re-assign!' in m.get_payload()[0].get_payload(decode=True)) + + def stepCheckBugInit(self, sequence=None, sequence_list=None, **kw): """ Create a dummy bug @@ -339,7 +352,7 @@ class TestBug(ERP5TypeTestCase): Re Assign the bug. """ bug = sequence.get('bug') - self.workflow_tool.doActionFor(bug, 're_assign_action', send_event=1) + self.workflow_tool.doActionFor(bug, 're_assign_action', send_event=1, comment='Re-assign!') self.assertEquals(bug.getSimulationState(), 'ready') def stepCloseBug(self, sequence=None, sequence_list=None, **kw): @@ -437,6 +450,7 @@ class TestBug(ERP5TypeTestCase): , 'stepReAssignBug' , 'stepTic' , 'stepCheckBugNotification' + , 'stepCheckBugMessageNotificationReAssign' , 'stepResolveBug' , 'stepTic' , 'stepCheckBugNotification' -- 2.30.9