Commit 7476d220 authored by Jérome Perrin's avatar Jérome Perrin

for now, tests a new object has an empty string as a title.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9371 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e369f8a8
...@@ -156,7 +156,7 @@ class TestBase(ERP5TypeTestCase): ...@@ -156,7 +156,7 @@ class TestBase(ERP5TypeTestCase):
object_instance = module.newContent(portal_type=self.object_portal_type) object_instance = module.newContent(portal_type=self.object_portal_type)
sequence.edit( sequence.edit(
object_instance=object_instance, object_instance=object_instance,
current_title=None, current_title='',
current_group_value=None current_group_value=None
) )
...@@ -864,16 +864,17 @@ class TestBase(ERP5TypeTestCase): ...@@ -864,16 +864,17 @@ class TestBase(ERP5TypeTestCase):
sequence_list.play(self, quiet=quiet) sequence_list.play(self, quiet=quiet)
def test_08_emptyObjectHasNoTitle(self, quiet=quiet, run=run_all_test): def test_08_emptyObjectHasNoTitle(self, quiet=quiet, run=run_all_test):
""" """Test that an empty object has no title.
Test if edit update a tales expression.
""" """
if not run: return if not run: return
portal = self.getPortal() portal = self.getPortal()
portal_type = "Organisation" portal_type = "Organisation"
module = portal.getDefaultModule(portal_type=portal_type) module = portal.getDefaultModule(portal_type=portal_type)
object = module.newContent(portal_type=portal_type) obj = module.newContent(portal_type=portal_type)
self.assertEquals(None, # XXX title is an empty string by default, but it's still unsure wether it
object.getProperty("title")) # should be None or ''
self.assertEquals('', obj.getProperty("title"))
self.assertEquals('', obj.getTitle())
if __name__ == '__main__': if __name__ == '__main__':
framework() framework()
......
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