[IMP] perform wizard submit as a portal user

bzr revid: abo@openerp.com-20121001152852-7pw98ediblodp1xk
This commit is contained in:
Antonin Bourguignon 2012-10-01 17:28:52 +02:00
parent 93c83f1b7a
commit 0fc7b34011
1 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-
Set the current user as portal user.
-
!context
'uid': 'portal.demo_user0'
-
As a portal user, I fill in the contact form and submit it.
-
@ -17,9 +22,12 @@
And a lead is created with the proper values.
-
!python {model: crm.lead}: |
ids = self.search(cr, uid, [('name', '=', 'Need information about your contact form module')])
from openerp import SUPERUSER_ID
ids = self.search(cr, SUPERUSER_ID, [('name', '=', 'Need information about your contact form module')])
assert len(ids) == 1, 'There are more than one matching lead, while only one was expected'
obj = self.browse(cr, uid, ids[0])
obj = self.browse(cr, SUPERUSER_ID, ids[0])
expected_values = dict(
name='Need information about your contact form module',
partner_name='Mr. John Doe',