[Erp5-report] r39207 lucas - /erp5/trunk/products/ERP5/tests/testCRM.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 15 01:18:35 CEST 2010
Author: lucas
Date: Fri Oct 15 01:18:31 2010
New Revision: 39207
URL: http://svn.erp5.org?rev=39207&view=rev
Log:
Added a new test to check if the Support Request has the reference generated automatically.
Modified:
erp5/trunk/products/ERP5/tests/testCRM.py
Modified: erp5/trunk/products/ERP5/tests/testCRM.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testCRM.py?rev=39207&r1=39206&r2=39207&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testCRM.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testCRM.py [utf8] Fri Oct 15 01:18:31 2010
@@ -365,6 +365,29 @@ class TestCRM(BaseTestCRM):
self.assertEqual(new_event.getTextContent(), '> Event Content')
self.assertEqual(new_event.getTitle(), 'Re: Event Title')
+ def test_SupportRequest_referenceAutomaticallyGenerated(self):
+ """
+ When you create or clone a Support Request document, it must
+ have the reference generated automatically.
+ """
+ portal_type = "Support Request"
+ title = "Title of the Support Request"
+ content = "This is the content of the Support Request"
+ module = self.portal.support_request_module
+ support_request = module.newContent(portal_type=portal_type,
+ title=title,)
+ self.stepTic()
+
+ self.assertNotEquals(None, support_request.getReference())
+
+ new_support_request = support_request.Base_createCloneDocument(
+ batch_mode=1)
+ self.assertEquals(new_support_request.getTitle(), title)
+ self.assertNotEquals(None, support_request.getReference())
+ self.assertNotEquals(support_request.getReference(),
+ new_support_request.getReference())
+
+
class TestCRMMailIngestion(BaseTestCRM):
"""Test Mail Ingestion for standalone CRM.
More information about the Erp5-report
mailing list