Commit 3e6f949d authored by Jérome Perrin's avatar Jérome Perrin

update tests for new sale opportunity workflow


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19459 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55e5c9a1
...@@ -76,10 +76,19 @@ class CrmTestCase(ERP5TypeTestCase): ...@@ -76,10 +76,19 @@ class CrmTestCase(ERP5TypeTestCase):
elif portal_type == ('Support Request'): elif portal_type == ('Support Request'):
tk = self.support_request_module.newContent(portal_type=portal_type,**kw) tk = self.support_request_module.newContent(portal_type=portal_type,**kw)
if simulation_state == 'validated': # not all states are implemented here for now.
if portal_type == 'Sale Opportunity':
# Sale Opportunity have a different workflow.
if simulation_state in ('contacted', 'offered',):
tk.validate() tk.validate()
elif simulation_state == 'offered': #for Sale Opportunity workflow if simulation_state == 'offered':
tk.offer() tk.offer()
else:
if simulation_state == 'validated':
tk.validate()
# sanity check
self.assertEquals(simulation_state, tk.getSimulationState())
return tk return tk
def _makeOneEvent(self, portal_type='Fax Message', def _makeOneEvent(self, portal_type='Fax Message',
...@@ -134,6 +143,8 @@ class CrmTestCase(ERP5TypeTestCase): ...@@ -134,6 +143,8 @@ class CrmTestCase(ERP5TypeTestCase):
elif simulation_state == 'ordered': elif simulation_state == 'ordered':
ev.plan() ev.plan()
ev.order() ev.order()
# sanity check
self.assertEquals(simulation_state, ev.getSimulationState())
return ev return ev
def login(self): def login(self):
......
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