Commit 3aaefab3 authored by Jérome Perrin's avatar Jérome Perrin

base/upgrader: activate ERP5LoginUserManager post upgrade

To be able to use pre_upgrade we would need to install the bt first
parent 04b24aed
......@@ -22,7 +22,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>constraint_type/pre_upgrade</string>
<string>constraint_type/post_upgrade</string>
</tuple>
</value>
</item>
......
......@@ -484,11 +484,11 @@ class TestUserManagement(ERP5TypeTestCase):
acl_users= self.portal.acl_users
acl_users.manage_delObjects(ids=['erp5_login_users'])
portal_templates = self.portal.portal_templates
self.assertNotEqual(portal_templates.checkConsistency(filter={'constraint_type': 'pre_upgrade'}) , [])
self.assertNotEqual(portal_templates.checkConsistency(filter={'constraint_type': 'post_upgrade'}) , [])
# call checkConsistency again to check if FIX does not happen by checkConsistency().
self.assertNotEqual(portal_templates.checkConsistency(filter={'constraint_type': 'pre_upgrade'}) , [])
portal_templates.fixConsistency(filter={'constraint_type': 'pre_upgrade'})
self.assertEqual(portal_templates.checkConsistency(filter={'constraint_type': 'pre_upgrade'}) , [])
self.assertNotEqual(portal_templates.checkConsistency(filter={'constraint_type': 'post_upgrade'}) , [])
portal_templates.fixConsistency(filter={'constraint_type': 'post_upgrade'})
self.assertEqual(portal_templates.checkConsistency(filter={'constraint_type': 'post_upgrade'}) , [])
self.assertTrue('erp5_login_users' in \
[x[0] for x in self.portal.acl_users.plugins.listPlugins(IAuthenticationPlugin)])
self.assertTrue('erp5_login_users' in \
......
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