From 82c244da37ee2a77f1ce187db27b4060ca142e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 16 Sep 2008 09:42:19 +0000 Subject: [PATCH] keep all preferences that have a site priority git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23630 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testAccounting.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/product/ERP5/tests/testAccounting.py b/product/ERP5/tests/testAccounting.py index ecc6ece0ae..71df461797 100644 --- a/product/ERP5/tests/testAccounting.py +++ b/product/ERP5/tests/testAccounting.py @@ -216,9 +216,10 @@ class AccountingTestCase(ERP5TypeTestCase): self.account_module.objectIds() if x not in ('bank', 'collected_vat', 'equity', 'fixed_assets', 'goods_purchase', 'goods_sales', 'payable', 'receivable', 'refundable_vat', 'stocks',)]) - self.portal.portal_preferences.manage_delObjects([x for x in - self.portal.portal_preferences.objectIds() if x not in - ('accounting_zuite_preference', 'default_site_preference')]) + self.portal.portal_preferences.manage_delObjects([x.getId() for x in + self.portal.portal_preferences.objectValues() + if x.getId() not in ('accounting_zuite_preference', 'default_site_preference') + and x.getPriority() != Priority.SITE]) self.portal.portal_simulation.manage_delObjects(list( self.portal.portal_simulation.objectIds())) get_transaction().commit() @@ -2271,7 +2272,7 @@ class TestAccountingWithSequences(ERP5TypeTestCase): self.pref = self.portal.portal_preferences.newContent( portal_type='Preference', preferred_section_category='group/vendor', preferred_accounting_transaction_section_category='group/vendor', - priority=3 ) + priority=Priority.USER ) self.workflow_tool.doActionFor(self.pref, 'enable_action') self.login() -- 2.30.9