Commit 211560dd authored by Jérome Perrin's avatar Jérome Perrin

"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
parent 980976cd
......@@ -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
......
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