Commit 75483949 authored by Julien Muchembled's avatar Julien Muchembled

Fix and speed up testMovementGroup

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@38604 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4db16607
......@@ -26,15 +26,20 @@
#
##############################################################################
import os
import unittest
from DateTime import DateTime
from Products.ERP5.mixin.builder import DuplicatedPropertyDictKeysError
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
class MovementGroupTestCase(ERP5TypeTestCase):
def getPortalName(self):
"""ID of the portal. """
return os.environ.get('erp5_tests_portal_id') or 'movement_group_test'
def getBusinessTemplateList(self):
return ('erp5_base', 'erp5_pdm', 'erp5_trade')
return ('erp5_base', 'erp5_pdm', 'erp5_simulation', 'erp5_trade')
def afterSetUp(self):
self.builder = self.portal.portal_deliveries.newContent(
......@@ -338,7 +343,6 @@ class TestDuplicatedKeyRaiseException(MovementGroupTestCase):
same key during building process"""
document_portal_type = 'Sale Order'
def test(self):
from Products.ERP5.Document.OrderBuilder import DuplicatedPropertyDictKeysError
order = self.portal.getDefaultModule(self.document_portal_type) \
.newContent(portal_type=self.document_portal_type)
applied_rule = self.portal.portal_simulation.newContent(
......@@ -433,7 +437,7 @@ class TestCategoryMovementGroup(MovementGroupTestCase):
source_list=['2'])]))
class TestMovementGroupCommonAPI(unittest.TestCase):
class TestMovementGroupCommonAPI(MovementGroupTestCase):
def test_separateMethod(self):
"""Make sure that _separate method works if argument is an empty list."""
......
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