Commit 1af22428 authored by Rafael Monnerat's avatar Rafael Monnerat

Merge branch 'master', remote-tracking branch 'origin' into rafael

parents 125c1c62 67bccd94
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if content_type == \'text/html\':\n
mail_template = context.Event_viewHtmlMimeMessage\n
else:\n
mail_template = context.Event_viewMimeMessage\n
\n
for embedded_file in embedded_file_list:\n
mime_type, content = embedded_file.getMimeTypeAndContent()\n
name = embedded_file.getFilename()\n
\n
attachment_list.append({\'mime_type\':mime_type,\n
\'content\':content,\n
\'name\':name})\n
\n
# Allow to embed image in HTML by setting the relative URL of the image with FCKeditor\n
attachment_url = embedded_file.getRelativeUrl()\n
body = body.replace(\'src="%s"\' % attachment_url, \'src="cid:%s"\' % \'\'.join([\'%s\' % ord(i) for i in name]))\n
\n
multipart = mail_template.as_message(mfrom=from_url,\n
mto=to_url,\n
subject=subject,\n
body=body,\n
encoding=\'utf-8\')\n
for attachment_dict in attachment_list:\n
multipart.add_file(data=attachment_dict[\'content\'],\n
content_type=attachment_dict[\'mime_type\'],\n
filename=attachment_dict[\'name\'])\n
\n
return str(multipart)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>from_url, to_url, subject, body, content_type, attachment_list=[], embedded_file_list=[]</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_createMailMessageAsString</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -50,24 +50,45 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
user_site_list = context.Baobab_getUserAssignedSiteList()\n
if len(user_site_list)>0:\n
site = context.Baobab_getVaultSite(user_site_list[0])\n
site_url = site.getRelativeUrl()\n
context.setSite(site_url)\n
]]></string> </value>
<value> <string>from email.utils import formataddr\n
portal = context.getPortalObject()\n
event = portal.restrictedTraverse(event_relative_url)\n
\n
subject = event.getTitle()\n
body = event.getTextContent()\n
sender = event.getSourceValue()\n
if sender is not None:\n
from_url = formataddr((sender.getTitle(), sender.getDefaultEmailText()))\n
else:\n
from_url = portal.portal_preferences.getPreferredEventSenderEmail()\n
\n
to_url = formataddr((context.getTitle(), context.getDefaultEmailText()))\n
\n
document_type_list = list(event.getPortalEmbeddedDocumentTypeList()) + list(event.getPortalDocumentTypeList())\n
embedded_file_list = event.getAggregateValueList(portal_type=document_type_list)\n
\n
content_type = event.getContentType()\n
mail_message = context.Base_createMailMessageAsString(from_url,\n
to_url,\n
subject,\n
body,\n
content_type,\n
attachment_list=[],\n
embedded_file_list=embedded_file_list)\n
\n
event.sendMailHostMessage(mail_message)\n
\n
if not event.hasData():\n
event.setData(mail_message)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>event_relative_url, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_init</string> </value>
<value> <string>Entity_sendEmail</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -51,79 +51,76 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from email.utils import formataddr\n
from email import message_from_string\n
portal = context.getPortalObject()\n
\n
if body is None:\n
body = context.getTextContent() #XXX This does not support structured text format.\n
\n
# Subject\n
if subject is None:\n
subject = context.getTitle()\n
\n
# From\n
if from_url is None:\n
sender = context.getSourceValue()\n
from_url = formataddr((sender.getTitle(), sender.getDefaultEmailText()))\n
use_activity = False\n
mail_message = None\n
to_url_list = []\n
\n
# Return-Path\n
if reply_url is None:\n
reply_url = portal.portal_preferences.getPreferredEventSenderEmail()\n
additional_headers = None\n
if reply_url:\n
additional_headers = {\'Return-Path\':reply_url}\n
if not context.isTempDocument() and to_url is None:\n
use_activity = True\n
\n
# To (multiple)\n
to_url_list = []\n
to_email_list = []\n
if to_url is None:\n
for recipient in context.getDestinationValueList():\n
email = recipient.getDefaultEmailText()\n
if email:\n
if email not in to_email_list:\n
if use_activity:\n
recipient = context.getDestinationValue()\n
to_url_list.append(formataddr((recipient.getTitle(), recipient.getDefaultEmailText())))\n
else:\n
to_email_list = []\n
for recipient in context.getDestinationValueList():\n
email = recipient.getDefaultEmailText()\n
if email:\n
to_email_list.append(email)\n
to_url_list.append(formataddr((recipient.getTitle(), email)))\n
else:\n
raise ValueError, \'Recipient %s has no defined email\' % recipient\n
elif same_type(to_url, \'\'):\n
to_url_list.append(formataddr((recipient.getTitle(), recipient.getDefaultEmailText())))\n
else:\n
raise ValueError("One email must be set to %s" % person.getRelativeUrl())\n
else:\n
to_url_list.append(to_url)\n
\n
# Attachments\n
if attachment_list is None:\n
attachment_list = []\n
document_type_list = list(context.getPortalEmbeddedDocumentTypeList()) + list(context.getPortalDocumentTypeList())\n
for attachment in context.getAggregateValueList(portal_type=document_type_list):\n
mime_type, content = attachment.getMimeTypeAndContent()\n
name = attachment.getFilename()\n
if download or not use_activity:\n
for to_url in to_url_list:\n
body = body or context.getTextContent()\n
subject = subject or context.getTitle()\n
\n
attachment_list.append({\'mime_type\':mime_type,\n
\'content\':content,\n
\'name\':name})\n
# From\n
if from_url is None:\n
sender = context.getSourceValue()\n
from_url = formataddr((sender.getTitle(), sender.getDefaultEmailText()))\n
\n
# Allow to embed image in HTML by setting the relative URL of the image with FCKeditor\n
attachment_url = attachment.getRelativeUrl()\n
body = body.replace(\'src="%s"\' % attachment_url, \'src="cid:%s"\' % \'\'.join([\'%s\' % ord(i) for i in name]))\n
# Return-Path\n
if reply_url is None:\n
reply_url = portal.portal_preferences.getPreferredEventSenderEmail()\n
additional_headers = None\n
if reply_url:\n
additional_headers = {\'Return-Path\':reply_url}\n
\n
# Build message per destination\n
mail_message = None\n
if context.getContentType() == \'text/html\':\n
mail_template = context.Event_viewHtmlMimeMessage\n
else:\n
mail_template = context.Event_viewMimeMessage\n
# Attachments\n
if attachment_list is None:\n
attachment_list = []\n
document_type_list = list(context.getPortalEmbeddedDocumentTypeList()) + list(context.getPortalDocumentTypeList())\n
embedded_file_list = context.getAggregateValueList(portal_type=document_type_list)\n
\n
content_type = context.getContentType()\n
\n
mail_message = context.Base_createMailMessageAsString(from_url, \n
to_url,\n
subject,\n
body,\n
content_type,\n
attachment_list=attachment_list,\n
embedded_file_list=embedded_file_list)\n
\n
for to_url in to_url_list:\n
multipart = mail_template.as_message(mfrom=from_url,\n
mto=to_url,\n
subject=subject,\n
body=body,\n
encoding=\'utf-8\')\n
for attachment_dict in attachment_list:\n
multipart.add_file(data=attachment_dict[\'content\'],\n
content_type=attachment_dict[\'mime_type\'],\n
filename=attachment_dict[\'name\'])\n
mail_message = str(multipart)\n
context.activate(activity=\'SQLQueue\').sendMailHostMessage(mail_message)\n
context.edit(data=mail_message)\n
if not use_activity:\n
context.activate(activity=\'SQLQueue\').sendMailHostMessage(mail_message)\n
\n
context.setData(mail_message)\n
if use_activity:\n
uid_list = context.getDestinationUidList()\n
method_kw = dict(event_relative_url=context.getRelativeUrl(),\n
from_url=from_url)\n
portal.portal_catalog.searchAndActivate(method_id="Entity_sendEmail",\n
uid=uid_list,\n
method_kw=method_kw, **kw)\n
\n
# Transit event workflow\n
if context.getTypeInfo() is not None:\n
......
1009
\ No newline at end of file
1015
\ No newline at end of file
......@@ -94,7 +94,7 @@ feed_data = {}\n
request = context.REQUEST\n
\n
# required channel elements for RSS 2.0 specification\n
required_field_list = (\'title\', \'description\', \'link\',)\n
required_field_list = (\'title\', \'description\', \'link\')\n
\n
# required + optional channel elements\n
allowed_field_list = (\'title\', \'description\', \'link\', \'author\', \n
......@@ -103,6 +103,7 @@ allowed_field_list = (\'title\', \'description\', \'link\', \'author\', \n
\n
# figure out which column is which, by using column titles\n
rss_column_mapping = {}\n
\n
for index, column_item in enumerate(label_list):\n
column_header = column_item[1]\n
if column_header.lower() in allowed_field_list:\n
......@@ -155,6 +156,7 @@ for line in line_list:\n
items.append(rss_item_string)\n
\n
feed_data[\'listItemInfos\'] = tuple(items)\n
\n
return feed_data\n
......
52
\ No newline at end of file
55
\ No newline at end of file
......@@ -104,10 +104,6 @@
<key> <string>id</string> </key>
<value> <string>test_bp</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>9</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Business Process</string> </value>
......
......@@ -101,10 +101,6 @@
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>2</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
......
......@@ -93,10 +93,6 @@
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
......
......@@ -73,10 +73,6 @@
<key> <string>id</string> </key>
<value> <string>test_advanced_sale_invoice_builder</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Delivery Builder</string> </value>
......
......@@ -44,8 +44,7 @@
<key> <string>delivery_cell_separate_order</string> </key>
<value>
<tuple>
<string>calculateAveragePrice</string>
<string>calculateAddQuantity</string>
<string>calculateSeparatePrice</string>
</tuple>
</value>
</item>
......@@ -75,10 +74,6 @@
<key> <string>id</string> </key>
<value> <string>test_advanced_sale_invoice_trade_model_builder</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>2</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Delivery Builder</string> </value>
......
......@@ -73,10 +73,6 @@
<key> <string>id</string> </key>
<value> <string>test_sale_packing_list_builder</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Delivery Builder</string> </value>
......
......@@ -153,10 +153,6 @@
<key> <string>id</string> </key>
<value> <string>test_trade_model_rule</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>3</string> </value>
</item>
<item>
<key> <string>matching_property</string> </key>
<value>
......
......@@ -123,10 +123,6 @@
<key> <string>id</string> </key>
<value> <string>test_stc</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>2</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Sale Trade Condition</string> </value>
......
......@@ -31,7 +31,7 @@
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>10.0</float> </value>
<value> <float>40.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
......
22
\ No newline at end of file
23
\ No newline at end of file
......@@ -42,6 +42,7 @@ from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email import encoders, message_from_string
from DateTime import DateTime
def makeFilePath(name):
return os.path.join(os.path.dirname(__file__), 'test_data', 'crm_emails', name)
......@@ -73,7 +74,6 @@ class BaseTestCRM(ERP5TypeTestCase):
for module_name in clear_module_name_list:
module = self.portal.unrestrictedTraverse(module_name)
module.manage_delObjects(list(module.objectIds()))
self.stepTic()
super(BaseTestCRM, self).beforeTearDown()
......@@ -82,7 +82,10 @@ class TestCRM(BaseTestCRM):
return "CRM"
def getBusinessTemplateList(self):
return ('erp5_base',
return ('erp5_full_text_myisam_catalog',
'erp5_core_proxy_field_legacy',
'erp5_base',
'erp5_ingestion',
'erp5_crm',)
def test_Event_CreateRelatedEvent(self):
......@@ -450,7 +453,9 @@ class TestCRMMailIngestion(BaseTestCRM):
def getBusinessTemplateList(self):
# Mail Ingestion must work with CRM alone.
return ('erp5_base',
return ('erp5_core_proxy_field_legacy',
'erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_ingestion',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_crm',
......@@ -846,7 +851,6 @@ class TestCRMMailSend(BaseTestCRM):
def afterSetUp(self):
super(TestCRMMailSend, self).afterSetUp()
portal = self.portal
# create customer organisation and person
portal.organisation_module.newContent(
id='customer',
......@@ -1189,7 +1193,6 @@ class TestCRMMailSend(BaseTestCRM):
text_content='This is an advertisement mail.')
mail_text = event.send(download=True)
# Check mail text.
message = message_from_string(mail_text)
part = None
......@@ -1673,6 +1676,55 @@ class TestCRMMailSend(BaseTestCRM):
transaction.commit()
self.tic()
def test_MailMessage_Event_send_generate_activity_list(self):
"""
Check that after post a Mail Message, the activities are generated
correctly
"""
person = self.portal.person_module.newContent(portal_type="Person")
person.edit(default_email_text="test@test.com", title="test%s" % person.getId())
self.stepTic()
mail_message = self.portal.event_module.newContent(portal_type="Mail Message")
relative_url_list = [z.getRelativeUrl() for z in self.portal.person_module.searchFolder()]
mail_message.setDestinationList(relative_url_list)
mail_message.setSource(relative_url_list[0])
mail_text_content = "Body Text Content"
mail_message.setTextContent(mail_text_content)
self.portal.portal_workflow.doActionFor(mail_message, "start_action")
self.stepTic()
mail_message.Event_send(packet_size=2)
import transaction
transaction.commit()
portal_activities = self.portal.portal_activities
message_list = [i for i in portal_activities.getMessageList() \
if i.kw.has_key("event_relative_url")]
try:
self.assertEquals(2, len(message_list))
finally:
self.stepTic()
last_message = self.portal.MailHost._last_message
self.assertTrue(mail_text_content in last_message[-1])
message = message_from_string(last_message[-1])
last_message_date = DateTime(message.get("Date"))
self.assertTrue(last_message_date.isCurrentDay())
def test_MailMessage_Event_send_simple_case(self):
"""
Check that the script Event_send send one email passing all parameters directly
from_url, to_url, reply_url, subject, body, attachment_format, attachment_list
"""
mail_message = self.portal.event_module.newContent(portal_type="Mail Message")
self.stepTic()
mail_message.Event_send(from_url='FG ER <eee@eee.com>',
to_url='Expert User <expert@in24.test>',
subject="Simple Case",
body="Body Simple Case",
attachment_list=[])
self.stepTic()
last_message = self.portal.MailHost._last_message[-1]
self.assertTrue("Body Simple Case" in last_message)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestCRM))
......
......@@ -76,6 +76,12 @@ class TestERP5Credential(ERP5TypeTestCase):
if 'MailHost' in self.portal.objectIds():
self.portal.manage_delObjects(['MailHost'])
self.portal._setObject('MailHost', DummyMailHost('MailHost'))
system_preference = self.getPreferenceTool().getActiveSystemPreference()
if system_preference is None:
system_preference = self.portal.portal_preferences.newContent(
portal_type='System Preference')
system_preference.enable()
system_preference.edit(preferred_event_sender_email=['Sample s@s.com',])
@reindex
def enableAlarm(self):
......
......@@ -1484,7 +1484,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_03_WebSection_getDocumentValueListSecurity(self):
""" Test WebSection_getDocumentValueList behaviour and security"""
self.login('admin')
site = self.web_site_module.newContent(portal_type='Web Site',
site = self.portal.web_site_module.newContent(portal_type='Web Site',
id='site')
site.publish()
......@@ -1620,7 +1620,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_04_ExpireUserAction(self):
""" Test the expire user action"""
self.login('admin')
site = self.web_site_module.newContent(portal_type='Web Site', id='site')
site = self.portal.web_site_module.newContent(portal_type='Web Site', id='site')
# create websections in a site and in anothers web sections
section_1 = site.newContent(portal_type='Web Section', id='section_1')
......@@ -1650,7 +1650,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_05_createWebSite(self):
""" Test to create or clone web sites with many users """
self.login('admin')
web_site_module = self.web_site_module
web_site_module = self.portal.web_site_module
# test for admin
try:
......@@ -1673,7 +1673,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
def test_06_createWebSection(self):
""" Test to create or clone web sections with many users """
self.login('admin')
site = self.web_site_module.newContent(portal_type='Web Site', id='site')
site = self.portal.web_site_module.newContent(portal_type='Web Site', id='site')
# test for admin
try:
......@@ -1818,7 +1818,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
project.validate()
self.stepTic()
website = self.web_site_module.newContent(portal_type='Web Site',
website = self.portal.web_site_module.newContent(portal_type='Web Site',
id='site')
website.publish()
website.setMembershipCriterionBaseCategory('follow_up')
......@@ -1856,7 +1856,7 @@ class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
Test that by default Anonymous User cannot access Web Site Module
"""
self.logout()
self.assertRaises(Unauthorized, self.web_site_module.view)
self.assertRaises(Unauthorized, self.portal.web_site_module.view)
class TestERP5WebCategoryPublicationWorkflow(ERP5TypeTestCase):
......
......@@ -344,7 +344,7 @@ class TestTradeModelLine(TestTradeModelLineMixin):
packing_list.stop()
transaction.commit()
self.tic()
self.stepInvoiceBuilderAlarm()
self.buildInvoices()
transaction.commit()
self.tic()
......@@ -478,21 +478,15 @@ class TestTradeModelLine(TestTradeModelLineMixin):
self.assertEquals(str(abs(line_dict['income_expense'])),
str(rounded_total_price + rounded_discount_price))
def stepPackingListBuilderAlarm(self, sequence=None,
sequence_list=None, **kw):
# global builder alarm does not exist in legacy simulation
# business templates.
alarm = getattr(self.portal.portal_alarms, 'packing_list_builder_alarm', None)
if alarm is not None:
alarm.activeSense()
def stepInvoiceBuilderAlarm(self, sequence=None,
sequence_list=None, **kw):
# global builder alarm does not exist in legacy simulation
# business templates.
alarm = getattr(self.portal.portal_alarms, 'invoice_builder_alarm', None)
if alarm is not None:
alarm.activeSense()
def buildPackingLists(self):
self.portal.portal_alarms.packing_list_builder_alarm.activeSense()
transaction.commit()
self.tic()
def buildInvoices(self):
self.portal.portal_alarms.invoice_builder_alarm.activeSense()
transaction.commit()
self.tic()
###
## Test cases
......@@ -606,9 +600,7 @@ class TestTradeModelLine(TestTradeModelLineMixin):
order.confirm()
transaction.commit()
self.tic()
self.stepPackingListBuilderAlarm()
transaction.commit()
self.tic()
self.buildPackingLists()
packing_list, = order.getCausalityRelatedValueList(
portal_type=self.packing_list_portal_type)
......@@ -937,9 +929,7 @@ return lambda *args, **kw: 1""")
order.confirm()
transaction.commit()
self.tic()
self.stepPackingListBuilderAlarm()
transaction.commit()
self.tic()
self.buildPackingLists()
packing_list = order.getCausalityRelatedValue(
portal_type=self.packing_list_portal_type)
......@@ -951,9 +941,7 @@ return lambda *args, **kw: 1""")
packing_list.deliver()
transaction.commit()
self.tic()
self.stepInvoiceBuilderAlarm()
transaction.commit()
self.tic()
self.buildInvoices()
invoice = packing_list.getCausalityRelatedValue(
portal_type=self.invoice_portal_type)
......
......@@ -70,6 +70,8 @@ class TradeModelRule(Rule):
context_movement = applied_rule.getParentValue()
for amount in trade_condition.getAggregatedAmountList(context_movement):
if not amount.getQuantity():
continue
# business path specific
business_path_list = business_process.getPathValueList(
trade_phase=amount.getTradePhaseList(), context=context_movement)
......
......@@ -121,13 +121,10 @@ class TestSimulationPerformance(ERP5TypeTestCase, LogInterceptor):
"""
Return the list of business templates.
"""
return ('erp5_base',
'erp5_pdm',
'erp5_trade',
'erp5_invoicing',
'erp5_accounting',
'erp5_advanced_invoicing',
'erp5_simulation_performance_test',)
return ('erp5_core_proxy_field_legacy', 'erp5_base',
'erp5_pdm', 'erp5_simulation', 'erp5_trade',
'erp5_accounting', 'erp5_invoicing', 'erp5_advanced_invoicing',
'erp5_simulation_test', 'erp5_simulation_performance_test')
def afterSetUp(self):
"""
......@@ -794,6 +791,9 @@ class TestSimulationPerformance(ERP5TypeTestCase, LogInterceptor):
number_of_additional_sale_packing_list_lines=5,
measurable=True)
from Products.ERP5Legacy.tests import Legacy_getBusinessTemplateList
Legacy_getBusinessTemplateList(TestSimulationPerformance)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestSimulationPerformance))
......
......@@ -52,6 +52,9 @@ for name in list(TestTradeModelLine.__dict__):
if '_NewSimulation_' in name:
delattr(TestTradeModelLine, name)
TestTradeModelLine.buildInvoices = TestTradeModelLine.buildPackingLists = \
lambda self: None
def createBusinessProcess(self, *args, **kw):
business_process = super(TestTradeModelLine, self) \
.createBusinessProcess(*args, **kw)
......
......@@ -57,7 +57,7 @@ class ERP5(_ERP5):
# skip some tests
if test_case.startswith('testLive') or test_case.startswith('testVifib') \
or test_case.startswith('testFunctional') \
or test_case in ('testPerformance', 'testSimulationPerformance',
or test_case in ('testPerformance', 'testLegacySimulationPerformance',
'testERP5LdapCatalog', # XXX (Ivan), until LDAP server is available this test will alway fail
'testERP5eGov', # it is not maintained any more
'testAccounting_l10n_fr_m9'):
......
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