Commit 368ecbe2 authored by Jérome Perrin's avatar Jérome Perrin

tests getProperty with workflow accessors properties supports a default

argument.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10317 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 104b4f48
...@@ -854,6 +854,16 @@ class TestPropertySheet: ...@@ -854,6 +854,16 @@ class TestPropertySheet:
self.assertEquals(initial_state.title, self.assertEquals(initial_state.title,
person.getProperty('translated_validation_state_title')) person.getProperty('translated_validation_state_title'))
# default parameter is accepted by getProperty for compatibility
self.assertEquals(initial_state.getId(),
person.getProperty('validation_state', 'default'))
self.assertEquals(initial_state.title,
person.getProperty('validation_state_title', 'default'))
# XXX we do not have translation system set up at that point
self.assertEquals(initial_state.title,
person.getProperty('translated_validation_state_title',
'default'))
# pass a transition and check accessors again. # pass a transition and check accessors again.
person.validate() person.validate()
self.assertEquals(other_state.getId(), person.getValidationState()) self.assertEquals(other_state.getId(), person.getValidationState())
......
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