From 211560dde9827a8dff569bbc9a65b4c386a9731e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 18 Feb 2011 13:04:46 +0000 Subject: [PATCH] "storage_id" on standard properties was apparently not tested git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43474 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/testERP5Type.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/product/ERP5Type/tests/testERP5Type.py b/product/ERP5Type/tests/testERP5Type.py index aae135a4a4..0825395148 100644 --- a/product/ERP5Type/tests/testERP5Type.py +++ b/product/ERP5Type/tests/testERP5Type.py @@ -793,6 +793,21 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): self.assertEquals(result, ['alpha', 'beta']) self.assertEquals(person.getSubjectList(), ['alpha', 'beta']) + def test_storage_id_accessor(self): + self._addProperty('Person', + self.id(), + 'foo_bar', + elementary_type='string', + storage_id='foo_bar_storage', + portal_type='Standard Property') + obj = self.getPersonModule().newContent(portal_type='Person') + obj.setFooBar('foo') + self.assertEquals('foo', obj.getFooBar()) + self.assertEquals('foo', getattr(obj, 'foo_bar_storage', 'unset')) + obj.edit(foo_bar='bar') + self.assertEquals('bar', obj.getFooBar()) + self.assertEquals('bar', getattr(obj, 'foo_bar_storage', 'unset')) + def test_13_acquiredAccessor(self): """ The purpose of this test is to make sure that accessor for -- 2.30.9