[Erp5-report] r25537 - /erp5/trunk/products/ERP5/tests/testAccounting.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 12 11:01:26 CET 2009
Author: kazuhiko
Date: Thu Feb 12 11:01:16 2009
New Revision: 25537
URL: http://svn.erp5.org?rev=25537&view=rev
Log:
disable existing User preferences before tests that create a new User preference.
Modified:
erp5/trunk/products/ERP5/tests/testAccounting.py
Modified: erp5/trunk/products/ERP5/tests/testAccounting.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccounting.py?rev=25537&r1=25536&r2=25537&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py [utf8] Thu Feb 12 11:01:16 2009
@@ -3598,7 +3598,14 @@
def getTitle(self):
return "Accounting Transaction Template"
+ def disableUserPreferenceList(self):
+ """Disable existing User preferences."""
+ for preference in self.portal.portal_preferences.objectValues():
+ if preference.getPriority() == Priority.USER:
+ preference.disable()
+
def test_Template(self):
+ self.disableUserPreferenceList()
self.login('claudie')
preference = self.portal.portal_preferences.newContent('Preference')
preference.priority = Priority.USER
@@ -3643,6 +3650,7 @@
def test_Base_doAction(self):
# test creating a template using Base_doAction script (this is what
# erp5_xhtml_style does)
+ self.disableUserPreferenceList()
self.login('claudie')
preference = self.portal.portal_preferences.newContent('Preference')
preference.priority = Priority.USER
More information about the Erp5-report
mailing list