From 6c6bd9d3111669585dc54afdd1d0746578cce264 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Tue, 31 Oct 2023 10:47:32 +0000
Subject: [PATCH] slapos_erp5: test: typo

---
 .../test.erp5.testSlapOSERP5GroupRoleSecurity.py               | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py b/master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
index ce95636c1..944cd3119 100644
--- a/master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+++ b/master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
@@ -22,6 +22,7 @@
 ##############################################################################
 from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixinWithAbort
 from AccessControl import getSecurityManager
+import transaction
 
 class TestSlapOSGroupRoleSecurityCoverage(SlapOSTestCaseMixinWithAbort):
   maxDiff = None
@@ -1346,6 +1347,8 @@ class TestProject(TestSlapOSGroupRoleSecurityMixin):
   def test_Project_default(self):
     project = self.portal.project_module.newContent(
         portal_type='Project')
+    # Local roles are recalculated at the end of the transaction
+    transaction.commit()
     self.assertSecurityGroup(project,
         ['F-SALEAGT', 'F-SALEMAN', 'F-ACCOUNTING*',
          project.getReference(), self.user_id], False)
-- 
2.30.9