Commit 4ee61a23 authored by Gabriel Monnerat's avatar Gabriel Monnerat

ERP5: remove unused imports

parent 008b2d4e
......@@ -26,11 +26,9 @@
#
##############################################################################
from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from AccessControl.SecurityManagement import getSecurityManager
from Products.ERP5Type.tests.utils import DummyMailHost
from AccessControl import Unauthorized
from Testing import ZopeTestCase
from Products.ERP5Type.tests.Sequence import Step, Sequence, SequenceList
from zLOG import LOG
......
......@@ -27,12 +27,9 @@
#
##############################################################################
import unittest
import os
from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeLiveTestCase
from zLOG import LOG, INFO, ERROR
from Products.CMFCore.utils import getToolByName
import random
import string
......
......@@ -28,7 +28,6 @@
import os, shutil, tempfile, unittest
from Acquisition import aq_base
from Products.ERP5Type.Base import Base
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5.ERP5Site import addERP5Tool
......
......@@ -59,7 +59,6 @@ class TestRunMyDoc(ERP5TypeTestCase):
This is ran before anything, used to set the environment
"""
# here, you can create the categories and objects your test will depend on
pass
website_id = "test_page_web_site"
......
from PIL import Image
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
import transaction
from zLOG import LOG,INFO,ERROR
import json
from cStringIO import StringIO
import os
......
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from zLOG import LOG,INFO,ERROR
import json
from Products.ERP5Type.Log import log
from time import sleep
class TestTaskDistribution(ERP5TypeTestCase):
......
......@@ -32,7 +32,6 @@ from unittest import expectedFailure
from zLOG import LOG
from Testing import ZopeTestCase
from AccessControl.SecurityManagement import newSecurityManager
import os
class TestVirtuemartSynchronization(ERP5TypeTestCase):
"""
......
......@@ -27,7 +27,6 @@
##############################################################################
import unittest
import urllib
import transaction
import ZODB
from ZODB.DemoStorage import DemoStorage
......
......@@ -2,7 +2,7 @@ import unittest
from unittest import TestCase
from erp5.util.testnode.testnode import TestNode
from erp5.util.testnode.NodeTestSuite import SlapOSInstance, NodeTestSuite
from erp5.util.testnode.NodeTestSuite import SlapOSInstance
from erp5.util.testnode.ProcessManager import ProcessManager, SubprocessError
from erp5.util.testnode.Updater import Updater
......
......@@ -24,19 +24,13 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from datetime import datetime,timedelta
import os
import subprocess
import sys
import time
import glob
import SlapOSControler
import json
import time
import shutil
import logging
import string
import random
import Utils
import traceback
......
......@@ -32,7 +32,6 @@ import unittest
from Products.ERP5Type.tests.utils import LogInterceptor
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.Base import Base
from Products.CMFActivity.ActiveObject import INVOKE_ERROR_STATE
from Products.CMFActivity.Activity.Queue import VALIDATION_ERROR_DELAY
......@@ -2083,7 +2082,6 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
"""
self.tic()
activity_tool = self.getActivityTool()
from Shared.DC.ZRDB.TM import TM
try:
Organisation.registerFailingTransactionManager = registerFailingTransactionManager
obj = self.getPortal().organisation_module.newContent(portal_type='Organisation')
......
......@@ -31,7 +31,6 @@
"""
import unittest
import os
from DateTime import DateTime
from Products.CMFCore.utils import _checkPermission
......
......@@ -30,7 +30,6 @@
"""
import unittest
import os
from DateTime import DateTime
......
......@@ -28,7 +28,6 @@
import unittest
from Products.ERP5Type.tests.utils import reindex
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from zLOG import LOG
class TestApparelModel(ERP5TypeTestCase):
......@@ -170,7 +169,6 @@ class TestApparelModel(ERP5TypeTestCase):
Check that it's possible to copy colour range variation from a model, and
that cells are well created.
'''
pass
def test_suite():
......
......@@ -33,7 +33,6 @@ import time
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.Formulator.Errors import ValidationError
from Products.ERP5Type.Document import newTempBase
from DateTime import DateTime
class TestAuthenticationPolicy(ERP5TypeTestCase):
"""
......
......@@ -29,7 +29,6 @@
##############################################################################
import unittest
import time
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from DateTime import DateTime
......
......@@ -32,9 +32,8 @@ import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from DateTime import DateTime
from Products.ERP5Type.tests.utils import createZODBPythonScript, reindex
from Products.ERP5Type.tests.utils import reindex
from Products.ERP5Type.tests.utils import todo_erp5
from Products.ERP5.tests.utils import newSimulationExpectedFailure
class TestBPMMixin(ERP5TypeTestCase):
"""Skeletons for tests which depend on BPM"""
......
......@@ -29,7 +29,6 @@
"""
import unittest
import os
from DateTime import DateTime
......
......@@ -41,7 +41,6 @@ from Products.ERP5Type.Globals import PersistentMapping
from Products.CMFCore.Expression import Expression
from Products.ERP5Type.tests.utils import LogInterceptor
from Products.ERP5Type.Workflow import addWorkflowByType
from Products.ERP5VCS.WorkingCopy import getVcsTool
import shutil
import os
import gc
......
......@@ -30,7 +30,6 @@ import unittest
from DateTime import DateTime
from zLOG import LOG
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Testing import ZopeTestCase
from Products.ERP5.tests.testAccounting import AccountingTestCase
from AccessControl.SecurityManagement import newSecurityManager
......
......@@ -29,7 +29,7 @@
##############################################################################
import unittest
from Products.ERP5Type.tests.Sequence import Sequence, SequenceList
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
clear_module_name_list = """
......
......@@ -30,7 +30,6 @@ import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import Sequence
from Products.ERP5.tests.testPackingList import TestPackingListMixin
from Products.ERP5.tests.utils import newSimulationExpectedFailure
class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase):
"""
......
......@@ -28,7 +28,6 @@
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.Base import _aq_reset
from AccessControl.SecurityManagement import newSecurityManager
class TestERP5Category(ERP5TypeTestCase):
......
......@@ -28,11 +28,9 @@
##############################################################################
import os
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
class TestERP5Coordinate(ERP5TypeTestCase):
"""Check Coordinate API
......
......@@ -28,7 +28,6 @@
##############################################################################
import unittest
from hashlib import md5
import pprint
from AccessControl.SecurityManagement import newSecurityManager
......
......@@ -29,7 +29,6 @@
This test is experimental for new simulation implementation.
"""
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import SequenceList
......
......@@ -34,7 +34,6 @@ from unittest import expectedFailure, skip
from AccessControl import Unauthorized
from Testing import ZopeTestCase
from DateTime import DateTime
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import DummyLocalizer
from Products.ERP5Type.tests.utils import createZODBPythonScript
......
......@@ -30,12 +30,10 @@
import unittest
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.utils import FileUpload
from zLOG import LOG
import os
TEST_FILES_HOME = os.path.join(os.path.dirname(__file__), 'test_data')
......
......@@ -29,11 +29,7 @@
##############################################################################
import unittest
import time
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.Formulator.Errors import ValidationError
from Products.ERP5Type.Document import newTempBase
from DateTime import DateTime
class TestExternalAccount(ERP5TypeTestCase):
"""
......
......@@ -27,11 +27,8 @@
##############################################################################
import unittest
import os
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.CMFCore.utils import getToolByName
from zLOG import LOG
from Products.ERP5Type.tests.Sequence import SequenceList
class TestFieldLibraryGuideline(ERP5TypeTestCase):
......
......@@ -33,7 +33,6 @@ import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import createZODBPythonScript
from _mysql_exceptions import ProgrammingError
from BTrees.OOBTree import OOBTree
class TestIdTool(ERP5TypeTestCase):
......
......@@ -34,7 +34,6 @@ from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.Utils import ScalarMaxConflictResolver
from BTrees.Length import Length
from BTrees.OOBTree import OOBTree
from zLOG import LOG
class TestIdToolUpgrade(ERP5TypeTestCase):
......
......@@ -35,7 +35,6 @@ from Products.ERP5Type.tests.Sequence import SequenceList
from DateTime import DateTime
from zLOG import LOG
from Products.ERP5.Document.ImmobilisationMovement import UNIMMOBILISING_METHOD, NO_CHANGE_METHOD
from Products.ERP5.tests.utils import newSimulationExpectedFailure
class TestImmobilisationMixin(ERP5TypeTestCase):
......
......@@ -50,7 +50,6 @@ class TestInternalOrder(TestPurchaseOrder):
"""
No Payment conditions for Internal Orders
"""
pass
def test_suite():
suite = unittest.TestSuite()
......
......@@ -29,7 +29,6 @@
import unittest
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl import Unauthorized
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
import json
......
......@@ -28,14 +28,11 @@
#
##############################################################################
import os
import threading
import time
import unittest
import urllib
import transaction
from DateTime import DateTime
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import createZODBPythonScript
......
......@@ -50,7 +50,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from DateTime import DateTime
from zLOG import LOG
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.DateUtils import addToDate
from Products.ERP5.tests.testOrder import TestOrderMixin
from Products.ERP5Form.Selection import DomainSelection
from Products.ERP5Type.tests.utils import createZODBPythonScript
......
......@@ -30,11 +30,11 @@
Tests invoice creation from simulation.
"""
import sys, zipfile, xml.dom.minidom
import StringIO
import xml.dom.minidom
import zipfile
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import FileUpload, DummyMailHost
from Products.ERP5Type.tests.utils import FileUpload
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5OOo.OOoUtils import OOoParser
from AccessControl.SecurityManagement import newSecurityManager
......@@ -908,7 +908,6 @@ class TestInvoiceMixin(TestPackingListMixin):
start_date=self.datetime + 15,
stop_date=self.datetime + 25,
**kw)
pass
def stepUnifyStartDateWithDecisionInvoice(self, sequence=None,
sequence_list=None):
......
......@@ -29,11 +29,10 @@
import unittest
from unittest import expectedFailure
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.Base import TempBase
from Products.ERP5OOo.tests.testDms import makeFileUpload,TestDocumentMixin, TestDocument
from Products.ERP5OOo.tests.testDms import makeFileUpload
from Products.ERP5OOo.tests.testDms import TestDocumentMixin
def _getGadgetInstanceUrlFromKnowledgePad(knowledge_pad, gadget):
""" Get Knowledge Box's relative URL specialising a gadget in a Knowledge Pad."""
......
......@@ -28,7 +28,6 @@
import unittest
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5.tests.testBPMCore import TestBPMMixin
class TestMRPMixin(TestBPMMixin):
......
......@@ -31,9 +31,6 @@ import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import createZODBPythonScript
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
from zLOG import LOG
from Products.ERP5Type.tests.utils import DummyMailHost
class TestNotificationMessageModule(ERP5TypeTestCase):
......
......@@ -1363,7 +1363,6 @@ class TestOrder(TestOrderMixin, ERP5TypeTestCase):
Not yet tested....
"""
if not run: return
pass
def test_04_OrderLine_getVariationCategoryItemList(self, quiet=0,
run=run_all_test):
......
......@@ -33,7 +33,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from DateTime import DateTime
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5.tests.testOrder import TestOrderMixin
from Products.ERP5.tests.utils import newSimulationExpectedFailure
class TestOrderBuilderMixin(TestOrderMixin):
......
......@@ -26,7 +26,6 @@
#
##############################################################################
import unittest
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.CMFCore.exceptions import AccessControl_Unauthorized
......
......@@ -35,7 +35,6 @@ from zLOG import LOG
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5.tests.testOrder import TestOrderMixin
from DateTime import DateTime
from Products.ERP5Type.Globals import PersistentMapping
class TestPackingListMixin(TestOrderMixin):
"""
......@@ -2021,11 +2020,9 @@ class TestPurchasePackingListMixin(TestPackingListMixin):
def test_subcontent_reindexing_packing_list_container_line_cell(self):
"""No need to check Containers in Purchase Packing List"""
pass
def test_subcontent_reindexing_container_line_cell(self):
"""No need to check Containers in Purchase Packing List"""
pass
class TestPurchasePackingList(TestPurchasePackingListMixin, TestPackingList):
"""Tests for purchase packing list.
......
......@@ -51,7 +51,6 @@ class TestPurchaseOrder(TestOrder):
Surcharge this test, because hierarchical lines are not enable in purchase
order.
"""
pass
def test_20_testHierarchicalOrderAppliedRuleGeneration(self, quiet=0,
run=run_all_test):
......@@ -59,7 +58,6 @@ class TestPurchaseOrder(TestOrder):
Surcharge this test, because hierarchical lines are not enable in purchase
order.
"""
pass
def test_suite():
suite = unittest.TestSuite()
......
......@@ -36,7 +36,6 @@ from Testing import ZopeTestCase
from zLOG import LOG
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import reindex
from AccessControl.SecurityManagement import newSecurityManager
class ResourceVariationTestCase(ERP5TypeTestCase):
"""Tests starts with a preference activated for self.my_organisation, logged in
......
......@@ -29,7 +29,6 @@
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from zLOG import LOG
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5.tests.testPackingList import TestPackingListMixin
......
......@@ -73,7 +73,6 @@ import unittest
from time import time
import gc
import subprocess
import hotshot
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
......
......@@ -149,7 +149,6 @@ class TestSpellChecking(ERP5TypeTestCase):
Make sure that we have installed on this test all public
business template which has WorkflowTemplateItem.
"""
pass
def test_spell_check_workflow_states(self):
"""
......
......@@ -33,7 +33,6 @@ import unittest
from unittest import expectedFailure
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type import Permissions
from Products.ERP5Form.PreferenceTool import Priority
......
......@@ -31,7 +31,6 @@ import unittest
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ZSQLCatalog.SQLCatalog import Catalog
from Products.ERP5Type.tests.utils import SubcontentReindexingWrapper
class TradeConditionTestCase(ERP5TypeTestCase, SubcontentReindexingWrapper):
......
......@@ -37,7 +37,7 @@ from Products.ERP5.tests.testBPMCore import TestBPMMixin
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import simple_decorator
from DateTime import DateTime
from Products.ERP5Type.tests.utils import createZODBPythonScript, updateCellList
from Products.ERP5Type.tests.utils import createZODBPythonScript
def save_result_as(name):
......
......@@ -32,7 +32,6 @@ import MethodObject
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.Utils import getMessageIdWithContext
from zLOG import LOG
# dependency order
target_business_templates = (
......
......@@ -28,13 +28,8 @@
#
##############################################################################
import re
import unittest
import os
from AccessControl import Unauthorized
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import DummyLocalizer,\
createZODBPythonScript, FileUpload
......
......@@ -30,7 +30,6 @@
import unittest
import sys
from unittest import expectedFailure
from _mysql_exceptions import ProgrammingError
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
......
......@@ -28,9 +28,7 @@
##############################################################################
import unittest
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl.SecurityManagement import newSecurityManager
......
......@@ -28,13 +28,8 @@
##############################################################################
import unittest
import sys
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from zLOG import LOG
class TestERP5LdapCatalog(ERP5TypeTestCase):
......
......@@ -26,8 +26,6 @@
##############################################################################
from AccessControl import Unauthorized
from zLOG import LOG, INFO
import uuid
from DateTime import DateTime
from Products.ERP5Type.tests.utils import createZODBPythonScript
......
......@@ -26,10 +26,7 @@
#
##############################################################################
from Testing.ZopeTestCase.PortalTestCase import PortalTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
import unittest
class TestFieldValueCache(ERP5TypeTestCase):
"""
......
......@@ -33,7 +33,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
import unittest
# Initialize ERP5Form Product to load monkey patches
from Testing import ZopeTestCase
from Acquisition import aq_base
from Products.Formulator.FieldRegistry import FieldRegistry
......@@ -48,7 +47,6 @@ from Products.ERP5Type.Core.Folder import Folder
from Products.ERP5Form.Form import ERP5Form
from Products.ERP5Form.Form import field_value_cache
from Products.ERP5Form.Form import getFieldValue
from Products.ERP5Form import Form
from Products.ERP5Form import ProxyField
from DateTime import DateTime
......
......@@ -35,12 +35,6 @@ from AccessControl.SecurityManagement import newSecurityManager
from zLOG import LOG
from Products.ERP5Type.tests.Sequence import SequenceList
from Testing import ZopeTestCase
from Products.ERP5Type.Utils import get_request
from Products.ERP5Type.tests.utils import createZODBPythonScript
from ZPublisher.HTTPRequest import FileUpload
from StringIO import StringIO
from Products.ERP5Form.Selection import Selection
from Products.ERP5Form.Form import ERP5Form
from DateTime import DateTime
......
......@@ -31,13 +31,11 @@ from Products.ERP5Form.Form import ERP5Form
from DocumentTemplate import String
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Form.Selection import Selection
from Testing import ZopeTestCase
from Products.ERP5OOo.tests.utils import Validator
from Acquisition import aq_base
from Products.ERP5Type.Globals import get_request
from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST
from Products.ERP5Type.Core.Folder import Folder
from lxml import etree
HTTP_OK = 200
......