[Erp5-report] r29548 - /erp5/trunk/products/ERP5Type/tests/testSessionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 9 21:25:48 CEST 2009
Author: lucas
Date: Fri Oct 9 21:25:47 2009
New Revision: 29548
URL: http://svn.erp5.org?rev=29548&view=rev
Log:
Added a test to make sure that the session still the same after create a new person setting the reference.
Modified:
erp5/trunk/products/ERP5Type/tests/testSessionTool.py
Modified: erp5/trunk/products/ERP5Type/tests/testSessionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testSessionTool.py?rev=29548&r1=29547&r2=29548&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testSessionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/testSessionTool.py [utf8] Fri Oct 9 21:25:47 2009
@@ -245,6 +245,28 @@
# 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 at 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 @@
stepTestSessionGetattr \
stepTestSessionBulkStorage \
stepTestSessionExpire \
+ stepTestCheckSessionAfterNewPerson \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
@@ -297,6 +320,7 @@
stepTestSessionGetattr \
stepTestSessionBulkStorage \
stepTestSessionExpire \
+ stepTestCheckSessionAfterNewPerson \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
More information about the Erp5-report
mailing list