From ef1cf2b3fbff2f900c2761021ed6f391a790f700 Mon Sep 17 00:00:00 2001
From: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com>
Date: Sat, 22 Oct 2022 12:53:51 +0200
Subject: [PATCH] erp5_core_test: fix typos.

---
 .../portal_components/test.erp5.testBase.py   | 44 +++++++++----------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBase.py b/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBase.py
index 8ee9e7982c..427b463c53 100644
--- a/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBase.py
+++ b/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testBase.py
@@ -966,19 +966,19 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
 
     # Add a non-existent workflow.
     pw = self.getWorkflowTool()
-    dummy_simulation_worlflow_id = 'fake_simulation_workflow'
-    dummy_validation_worlflow_id = 'fake_validation_workflow'
+    dummy_simulation_workflow_id = 'fake_simulation_workflow'
+    dummy_validation_workflow_id = 'fake_validation_workflow'
     #Assume that erp5_styles workflow Manage permissions with acquired Role by default
-    addWorkflowByType(pw, 'erp5_workflow', dummy_simulation_worlflow_id)
-    addWorkflowByType(pw, 'erp5_workflow', dummy_validation_worlflow_id)
-    dummy_simulation_worlflow = pw[dummy_simulation_worlflow_id]
-    dummy_validation_worlflow = pw[dummy_validation_worlflow_id]
-    dummy_validation_worlflow.variables.setStateVar('validation_state')
+    addWorkflowByType(pw, 'erp5_workflow', dummy_simulation_workflow_id)
+    addWorkflowByType(pw, 'erp5_workflow', dummy_validation_workflow_id)
+    dummy_simulation_workflow = pw[dummy_simulation_workflow_id]
+    dummy_validation_workflow = pw[dummy_validation_workflow_id]
+    dummy_validation_workflow.variables.setStateVar('validation_state')
     organisation_type = portal.portal_types.getTypeInfo(portal_type)
     organisation_initial_workflow_list = organisation_type.getTypeWorkflowList()
-    organisation_type.setTypeWorkflowList([dummy_validation_worlflow_id,
-                                           dummy_simulation_worlflow_id])
-    permission_list = list(dummy_simulation_worlflow.permissions)
+    organisation_type.setTypeWorkflowList([dummy_validation_workflow_id,
+                                           dummy_simulation_workflow_id])
+    permission_list = list(dummy_simulation_workflow.permissions)
     manager_has_permission = {}
     for permission in permission_list:
       manager_has_permission[permission] = ('Manager',)
@@ -989,7 +989,7 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
     user = getSecurityManager().getUser()
     try:
       self.assertTrue(permission_list)
-      self.assertFalse(dummy_simulation_worlflow.states.draft.permission_roles)
+      self.assertFalse(dummy_simulation_workflow.states.draft.permission_roles)
       #1
       obj = module.newContent(portal_type=portal_type)
       #No role is defined by default on workflow
@@ -999,28 +999,28 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
       for permission in permission_list:
         self.assertTrue(user.has_permission(permission, obj))
       #2 Now configure both workflow with same configuration
-      dummy_simulation_worlflow.states.draft.permission_roles = manager_has_permission.copy()
-      dummy_validation_worlflow.states.draft.permission_roles = manager_has_permission.copy()
-      dummy_simulation_worlflow.updateRoleMappingsFor(obj)
-      dummy_validation_worlflow.updateRoleMappingsFor(obj)
+      dummy_simulation_workflow.states.draft.permission_roles = manager_has_permission.copy()
+      dummy_validation_workflow.states.draft.permission_roles = manager_has_permission.copy()
+      dummy_simulation_workflow.updateRoleMappingsFor(obj)
+      dummy_validation_workflow.updateRoleMappingsFor(obj)
 
       for permission in permission_list:
         self.assertTrue(user.has_permission(permission, obj))
-      #3 change only dummy_simulation_worlflow
-      dummy_simulation_worlflow.states.draft.permission_roles = manager_has_no_permission.copy()
-      dummy_simulation_worlflow.updateRoleMappingsFor(obj)
+      #3 change only dummy_simulation_workflow
+      dummy_simulation_workflow.states.draft.permission_roles = manager_has_no_permission.copy()
+      dummy_simulation_workflow.updateRoleMappingsFor(obj)
 
       for permission in permission_list:
         self.assertFalse(user.has_permission(permission, obj))
-      #4 enable acquisition for dummy_simulation_worlflow
-      dummy_simulation_worlflow.states.draft.permission_roles = None
-      dummy_simulation_worlflow.updateRoleMappingsFor(obj)
+      #4 enable acquisition for dummy_simulation_workflow
+      dummy_simulation_workflow.states.draft.permission_roles = None
+      dummy_simulation_workflow.updateRoleMappingsFor(obj)
       for permission in permission_list:
         self.assertTrue(user.has_permission(permission, obj))
     finally:
       # Make sure that the artificial workflow is not referred to any longer.
       organisation_type.setTypeWorkflowList(organisation_initial_workflow_list)
-      pw.manage_delObjects([dummy_simulation_worlflow_id, dummy_validation_worlflow_id])
+      pw.manage_delObjects([dummy_simulation_workflow_id, dummy_validation_workflow_id])
 
   def test_getViewPermissionOwnerDefault(self):
     """Test getViewPermissionOwner method behaviour"""
-- 
2.30.9