Commit 2874c0ca authored by Gabriel Monnerat's avatar Gabriel Monnerat

add test to script Base_getPreferencePathList

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44219 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 95850c2c
......@@ -344,3 +344,15 @@ class TestUNG(ERP5TypeTestCase):
gadget = self.portal.portal_catalog.getResultValue(portal_type="Gadget",
validation_state="visible")
self.assertEquals(gadget_id, gadget.getId())
def testBase_getPreferencePathList(self):
"""Test if the paths of preference objects are returned correctly"""
self.logout()
self.assertEquals(json.loads(self.portal.Base_getPreferencePathList()), None)
self.login("ERP5TypeTestCase")
preference_dict = json.loads(self.portal.Base_getPreferencePathList())
self.assertEquals(preference_dict, {})
self.portal.portal_preferences.ung_preference.enable()
self.stepTic()
preference_dict = json.loads(self.portal.Base_getPreferencePathList())
self.assertEquals(preference_dict["preference"], "portal_preferences/ung_preference")
\ No newline at end of file
293
\ No newline at end of file
294
\ No newline at end of file
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