Commit a7933c2f authored by wenjie.zheng's avatar wenjie.zheng

Improved Politesses

parent 5806f6ed
...@@ -85,7 +85,6 @@ from urllib import quote, unquote ...@@ -85,7 +85,6 @@ from urllib import quote, unquote
from difflib import unified_diff from difflib import unified_diff
import posixpath import posixpath
import transaction import transaction
import threading import threading
from ZODB.broken import Broken from ZODB.broken import Broken
from Products.ERP5.genbt5list import BusinessTemplateRevision, \ from Products.ERP5.genbt5list import BusinessTemplateRevision, \
...@@ -5868,7 +5867,8 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5868,7 +5867,8 @@ Business Template is a set of definitions, such as skins, portal types and categ
for act_id in action_list: for act_id in action_list:
if act_id is None: if act_id is None:
return (1, Base_translateString("ERROR: An action has an empty id on portal_type ${id}",mapping=dict(id=id))) return (1, Base_translateString("ERROR: An action has an empty id on portal_type ${id}"
,mapping=dict(id=id)))
action_id = id+' | '+act_id action_id = id+' | '+act_id
if action_id not in bt_action_list: if action_id not in bt_action_list:
bt_action_list.append(action_id) bt_action_list.append(action_id)
......
...@@ -1501,7 +1501,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor): ...@@ -1501,7 +1501,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
bt = sequence.get('current_bt', None) bt = sequence.get('current_bt', None)
self.assertTrue(bt is not None) self.assertTrue(bt is not None)
result, message = bt.getPortalTypesProperties() result, message = bt.getPortalTypesProperties()
self.assertEquals(result,0) self.assertEqual(result,0)
def stepCreateEmptyAction(self, sequence=None, **kw): def stepCreateEmptyAction(self, sequence=None, **kw):
""" """
...@@ -1522,7 +1522,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor): ...@@ -1522,7 +1522,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
bt = sequence.get('current_bt', None) bt = sequence.get('current_bt', None)
self.assertTrue(bt is not None) self.assertTrue(bt is not None)
result, message = bt.getPortalTypesProperties() result, message = bt.getPortalTypesProperties()
self.assertEquals(result,1) self.assertEqual(result,1)
def stepCreateSecondAction(self, sequence=None, **kw): def stepCreateSecondAction(self, sequence=None, **kw):
""" """
......
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