Commit 5fac069f authored by Lucas Carvalho's avatar Lucas Carvalho

Added a test to make sure that the session still the same after create a new...

Added a test to make sure that the session still the same after create a new person setting the reference.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29548 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4dc06a72
......@@ -245,6 +245,28 @@ class TestSessionTool(ERP5TypeTestCase):
# session should be an emty dic as it expired
self.assert_(session == {})
def stepTestCheckSessionAfterNewPerson(self, sequence=None, \
sequence_list=None, **kw):
""" Test if session still the same after create new person setting the
reference. """
session = self.portal.portal_sessions[self.session_id]
session.clear()
session['key'] = 'value'
self.getPortal().person_module.newContent(portal_type='Person',
default_address_city='test',
default_address_region='test',
default_address_street_address='test',
default_email_text='test@test.com',
default_fax_text='123456789',
first_name='test',
last_name='test',
password='secret',
reference='test')
session = self.portal.portal_sessions[self.session_id]
self.assertEquals(session.get('key'), 'value')
def test_01_CheckSessionTool(self, quiet=0, run=run_all_test):
""" Create portal_sessions tool and needed cache factory. """
if not run:
......@@ -274,6 +296,7 @@ class TestSessionTool(ERP5TypeTestCase):
stepTestSessionGetattr \
stepTestSessionBulkStorage \
stepTestSessionExpire \
stepTestCheckSessionAfterNewPerson \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -297,6 +320,7 @@ class TestSessionTool(ERP5TypeTestCase):
stepTestSessionGetattr \
stepTestSessionBulkStorage \
stepTestSessionExpire \
stepTestCheckSessionAfterNewPerson \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(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