Commit d8b2f7ae authored by Sebastien Robin's avatar Sebastien Robin

added a test wich proove that currenctly there is a bug, when we change the...

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

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9350 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f1cbd54
...@@ -698,6 +698,19 @@ class TestHR(ERP5TypeTestCase): ...@@ -698,6 +698,19 @@ class TestHR(ERP5TypeTestCase):
self.assertEquals( new_career_step.getSubordinationTitle(), self.assertEquals( new_career_step.getSubordinationTitle(),
new_organisation_title ) 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 ## Tests
################################## ##################################
...@@ -749,6 +762,22 @@ class TestHR(ERP5TypeTestCase): ...@@ -749,6 +762,22 @@ class TestHR(ERP5TypeTestCase):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) 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__': if __name__ == '__main__':
framework() framework()
else: else:
......
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