From 7bf508db84ccd091e57cac4ca1df04c8d62720b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 15 Apr 2009 14:32:56 +0000 Subject: [PATCH] add a test to make sure some categories are acquired on a person from the organisation related by subordination git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26448 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testERP5Base.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/product/ERP5/tests/testERP5Base.py b/product/ERP5/tests/testERP5Base.py index f6f0df5f80..39319c73b4 100644 --- a/product/ERP5/tests/testERP5Base.py +++ b/product/ERP5/tests/testERP5Base.py @@ -847,6 +847,27 @@ class TestERP5Base(ERP5TypeTestCase): sequence_list.addSequenceString(sequence_string) sequence_list.play(self, quiet=quiet) + def test_SubordinationAcquisition(self): + """ + Tests that persons acquire properties through subordination. + """ + portal_categories = self.portal.portal_categories + organisation = self.portal.organisation_module.newContent( + portal_type='Organisation', + role_value=portal_categories.role.client, + activity_value=portal_categories.activity.software, + group_value=portal_categories.group.nexedi,) + person = self.portal.person_module.newContent( + portal_type='Person', + career_subordination_value=organisation) + self.assertEquals(portal_categories.role.client, + person.getRoleValue()) + self.assertEquals(portal_categories.activity.software, + person.getActivityValue()) + self.assertEquals(portal_categories.group.nexedi, + person.getGroupValue()) + + # Dates def test_05_DatesOnPerson(self, quiet=QUIET, run=RUN_ALL_TEST): """Tests dates on Person objects. -- 2.30.9