Commit 9f044367 authored by Romain Courteaud's avatar Romain Courteaud

Check default value of getDescription accessor.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13560 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 21363a4e
......@@ -804,7 +804,8 @@ class TestPropertySheet:
self.assertEquals(person.getProperty(property_name, 'foo'), 'foo')
self.assertEquals(person.getProperty(property_name, d='foo'), 'foo')
def test_15b_DefaultValueDefinedOnPropertySheet(self,quiet=quiet, run=run_all_test):
def test_15b_DefaultValueDefinedOnPropertySheet(self, quiet=quiet,
run=run_all_test):
"""Tests that the default value is returned correctly when a default
value is defined using the property sheet.
"""
......@@ -835,6 +836,20 @@ class TestPropertySheet:
self.assertEquals(value, person.getProperty('dummy_ps_prop'))
self.assertEquals(value, person.getProperty('dummy_ps_prop', d='default'))
def test_15c_getDescriptionDefaultValue(self):
"""
Tests that the default value of getDescription is returned correctly
"""
portal = self.getPortal()
module = self.getPersonModule()
person = module.newContent(portal_type='Person')
# test default value of getDescription accessor
# as defined in the DublinCore PropertySheet
self.assertEquals(None, person.getDescription())
self.assertEquals('foo',
person.getDescription('foo'))
def test_16_SimpleStringAccessor(self,quiet=quiet, run=run_all_test):
"""Tests a simple string accessor.
This is also a way to test _addProperty method """
......
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