[Erp5-report] r36626 fabien - in /experimental/bt5/erp5_credential: TestTemplateItem/ bt/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 28 11:04:10 CEST 2010
Author: fabien
Date: Mon Jun 28 11:03:56 2010
New Revision: 36626
URL: http://svn.erp5.org?rev=36626&view=rev
Log:
update some method docstrings, add comments and improve credential update checks
Modified:
experimental/bt5/erp5_credential/TestTemplateItem/testERP5Credential.py
experimental/bt5/erp5_credential/bt/revision
Modified: experimental/bt5/erp5_credential/TestTemplateItem/testERP5Credential.py
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/TestTemplateItem/testERP5Credential.py?rev=36626&r1=36625&r2=36626&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/TestTemplateItem/testERP5Credential.py [utf8] (original)
+++ experimental/bt5/erp5_credential/TestTemplateItem/testERP5Credential.py [utf8] Mon Jun 28 11:03:56 2010
@@ -223,13 +223,15 @@ class TestERP5Credential(ERP5TypeTestCas
self.assertEquals(str(getSecurityManager().getUser()), 'homie')
def stepCreateCredentialUpdate(self, sequence=None, sequence_list=None, **kw):
- # check the dialog is automatically pre-filled with the values of logged in
- # user
+ '''
+ Create a credential update object an fill it with some modified
+ informations
+ '''
self.login('homie')
# fill in and submit the credential update form
result = self.portal.ERP5Site_newCredentialUpdate(\
first_name='Homie',
- last_name='Simpsons',
+ last_name='Simpsons', # add a 's' to the end of the last_name
password='new_password',
default_email_text='homie.simpsons at fox.com'
)
@@ -243,8 +245,9 @@ class TestERP5Credential(ERP5TypeTestCas
sequence.edit(credential_update=credential_update)
def stepCheckCredentialUpdateForm(self, sequence=None, sequence_list=None, **kw):
- # check the dialog is automatically pre-filled with the values of logged in
- # user
+ '''check the dialog is automatically pre-filled with the values of logged in
+ user
+ '''
self.login('homie')
result = self.portal.ERP5Site_viewNewCredentialUpdateDialog()
self.assertTrue('name="field_your_first_name" value="Homer"' in result)
@@ -265,6 +268,15 @@ class TestERP5Credential(ERP5TypeTestCas
# check the user with the old password don't exists anymore
self._assertUserDoesNotExists('homie', 'secret')
+ # check that informations on the person object have been updated
+ person_module = self.portal.getDefaultModule('Person')
+ related_person_result = person_module.searchFolder(reference='homie')
+ self.assertEquals(len(related_person_result), 1)
+ related_person = related_person_result[0]
+ self.assertEquals(related_person.getLastName(), 'Simpsons')
+ self.assertEquals(related_person.getDefaultEmailText(),
+ 'homie.simpsons at fox.com')
+
def stepSetAutomaticWorkflowOnCredentialRequest(self, sequence=None,
sequence_list=None, **kw):
self._setAutomaticWorkflowOnPortalTypeList('Credential Request')
Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=36626&r1=36625&r2=36626&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Mon Jun 28 11:03:56 2010
@@ -1 +1 @@
-92
\ No newline at end of file
+93
More information about the Erp5-report
mailing list