Commit a87da503 authored by Jérome Perrin's avatar Jérome Perrin

erp5_core_test: style fixes

parent b9beb439
......@@ -212,7 +212,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
Get a business template at portal_templates
"""
template_tool = self.getTemplateTool()
for bt in template_tool.objectValues(filter={'portal_type':'Business Template'}):
for bt in template_tool.objectValues(filter={'portal_type': 'Business Template'}):
if bt.getTitle() == title:
return bt
return None
......@@ -2640,7 +2640,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
import_bt = sequence.get('import_bt')
pc = self.getCatalogTool()
catalog_id = pc.getSQLCatalog().id
object_to_update = {'portal_catalog/'+catalog_id+'/z_another_fake_method':'install'}
object_to_update = {'portal_catalog/'+catalog_id+'/z_another_fake_method': 'install'}
import_bt.install(object_to_update=object_to_update)
def stepCreateNewBusinessTemplate(self, sequence=None, **kw):
......@@ -6570,7 +6570,7 @@ class TestBusinessTemplate(BusinessTemplateMixin):
finally:
shutil.rmtree(export_dir)
new_bt.install(force=0, object_to_update={'dummy_type_provider':'remove'})
new_bt.install(force=0, object_to_update={'dummy_type_provider': 'remove'})
self.assertNotEquals(None, types_tool.getTypeInfo('Base Category'))
self.assertNotIn('dummy_type_provider', types_tool.type_provider_list)
......
......@@ -1559,7 +1559,7 @@ class ObjectTemplateItem(BaseTemplateItem):
if update_dict.has_key(widget_path) and update_dict[widget_path] in ('remove', 'save_and_remove'):
continue
widget_in_form = 0
for group_id, group_value_list in new_groups_dict.iteritems():
for group_value_list in new_groups_dict.values():
if widget_id in group_value_list:
widget_in_form = 1
break
......@@ -1715,7 +1715,7 @@ class PathTemplateItem(ObjectTemplateItem):
if len(id_list) == 0:
return ['/'.join(relative_url_list)]
id = id_list[0]
if re.search('[\*\?\[\]]', id) is None:
if re.search(r'[\*\?\[\]]', id) is None:
# If the id has no meta character, do not have to check all objects.
obj = folder._getOb(id, None)
if obj is None:
......@@ -1772,7 +1772,7 @@ class PathTemplateItem(ObjectTemplateItem):
# Ignore any object without PortalType (non-ERP5 objects)
try:
portal_type = aq_base(obj).getPortalType()
except Exception, e:
except Exception:
pass
else:
if portal_type not in p.portal_types:
......
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