Commit 10c9f862 authored by Jérome Perrin's avatar Jérome Perrin

erp5_credential: fix wrongly configured properties

parent 4320819e
......@@ -50,9 +50,7 @@
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple>
<string>region</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -71,7 +69,9 @@
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: (\'Category\',)</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
......
......@@ -50,9 +50,7 @@
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple>
<string>region</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -71,7 +69,9 @@
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: (\'Category\',)</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
......
420
\ No newline at end of file
421
\ No newline at end of file
......@@ -136,6 +136,7 @@ class TestERP5Credential(ERP5TypeTestCase):
'site/dakar',
'site/paris',
'site/tokyo',
'region/europe/fr',
)
def beforeTearDown(self):
......@@ -1359,6 +1360,34 @@ class TestERP5Credential(ERP5TypeTestCase):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_credential_request_properties(self):
# test to prevent regression with a bug in property sheet definition
cr = self.portal.credential_request_module.newContent(
portal_type='Credential Request')
self.assertEquals(cr.getDefaultAddressCity(), None)
self.assertEquals(cr.getDefaultAddressRegion(), None)
self.assertEquals(cr.getOrganisationDefaultAddressCity(), None)
self.assertEquals(cr.getOrganisationDefaultAddressRegion(), None)
cr.setDefaultAddressRegion('europe/fr')
self.assertEquals(cr.getDefaultAddressCity(), None)
self.assertEquals(cr.getDefaultAddressRegion(), 'europe/fr')
self.assertEquals(cr.getOrganisationDefaultAddressCity(), None)
self.assertEquals(cr.getOrganisationDefaultTelephoneText(), None)
self.assertEquals(cr.getOrganisationDefaultAddressRegion(), None)
cr.deleteContent('default_address')
cr.setOrganisationDefaultAddressCity('Lille')
cr.setOrganisationDefaultAddressRegion('europe/fr')
self.assertEquals(cr.getOrganisationDefaultAddressCity(), 'Lille')
self.assertEquals(cr.getOrganisationDefaultAddressRegion(), 'europe/fr')
self.assertEquals(cr.getDefaultAddressCity(), None)
self.assertEquals(cr.getDefaultAddressRegion(), None)
def test_suite():
suite = unittest.TestSuite()
......
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