[Erp5-report] r9350 - /erp5/trunk/products/ERP5/tests/testERP5HR.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Aug 23 14:58:37 CEST 2006
Author: seb
Date: Wed Aug 23 14:58:35 2006
New Revision: 9350
URL: http://svn.erp5.org?rev=9350&view=rev
Log:
added a test wich proove that currenctly there is a bug, when we change the address of a person, then it will change the address of the related organisation
Modified:
erp5/trunk/products/ERP5/tests/testERP5HR.py
Modified: erp5/trunk/products/ERP5/tests/testERP5HR.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5HR.py?rev=9350&r1=9349&r2=9350&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5HR.py (original)
+++ erp5/trunk/products/ERP5/tests/testERP5HR.py Wed Aug 23 14:58:35 2006
@@ -698,6 +698,19 @@
self.assertEquals( new_career_step.getSubordinationTitle(),
new_organisation_title )
+ def stepCheckChangePersonAddress(self, sequence=None, **kw) :
+ """
+ We must make sure that if we change the address of a person,
+ then it will not change the address of the organisation.
+ """
+ person = sequence.get('person')
+ organisation = sequence.get('organisation')
+ self.assertEquals(organisation.getDefaultAddressCity(),'Lille')
+ self.assertEquals(person.getDefaultAddressCity(),'Lille')
+ person.setDefaultAddressCity('La Garnache')
+ self.assertEquals(person.getDefaultAddressCity(),'La Garnache')
+ self.assertEquals(organisation.getDefaultAddressCity(),'Lille')
+
##################################
## Tests
##################################
@@ -749,6 +762,22 @@
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
+ def test_04_SubordinationAndAddress(self, quiet=QUIET, run=RUN_ALL_TEST):
+ """
+ Tests that career steps subordination properties behave correctly
+ """
+ if not run: return
+ sequence_list = SequenceList()
+ step_list = [ 'CreatePerson'
+ , 'CreateOrganisation'
+ , 'SetOrganisationAddress'
+ , 'SetPersonCareer'
+ , 'CheckChangePersonAddress'
+ ]
+ sequence_string = ' '.join(step_list)
+ sequence_list.addSequenceString(sequence_string)
+ sequence_list.play(self)
+
if __name__ == '__main__':
framework()
else:
More information about the Erp5-report
mailing list