Commit 0bbcabf2 authored by Julien Muchembled's avatar Julien Muchembled

Move import of standard modules at the beginning of ERP5TypeTestCase.py

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30399 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae78a4ae
...@@ -7,6 +7,18 @@ ...@@ -7,6 +7,18 @@
__version__ = '0.3.0' __version__ = '0.3.0'
import base64
import md5
import os
import re
import sys
import time
import traceback
from cStringIO import StringIO
from cPickle import dumps
from glob import glob
from urllib import urlretrieve
# XXX make sure that get_request works. # XXX make sure that get_request works.
current_app = None current_app = None
import Products.ERP5Type.Utils import Products.ERP5Type.Utils
...@@ -163,7 +175,6 @@ ZopeTestCase.installProduct('ParsedXML', quiet=install_product_quiet) ...@@ -163,7 +175,6 @@ ZopeTestCase.installProduct('ParsedXML', quiet=install_product_quiet)
# Install everything else which looks like related to ERP5 # Install everything else which looks like related to ERP5
from OFS.Application import get_products from OFS.Application import get_products
from App.config import getConfiguration from App.config import getConfiguration
import os
instancehome = getConfiguration().instancehome instancehome = getConfiguration().instancehome
for priority, product_name, index, product_dir in get_products(): for priority, product_name, index, product_dir in get_products():
...@@ -177,14 +188,6 @@ for priority, product_name, index, product_dir in get_products(): ...@@ -177,14 +188,6 @@ for priority, product_name, index, product_dir in get_products():
from AccessControl.SecurityManagement import newSecurityManager, noSecurityManager from AccessControl.SecurityManagement import newSecurityManager, noSecurityManager
from Acquisition import aq_base from Acquisition import aq_base
import time
import md5
import traceback
import os
from cStringIO import StringIO
from urllib import urlretrieve
from glob import glob
import sys, re, base64
portal_name = 'erp5_portal' portal_name = 'erp5_portal'
...@@ -949,7 +952,6 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase): ...@@ -949,7 +952,6 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
request_method='GET', stdin=None, handle_errors=True): request_method='GET', stdin=None, handle_errors=True):
'''Publishes the object at 'path' returning a response object.''' '''Publishes the object at 'path' returning a response object.'''
from StringIO import StringIO
from ZPublisher.Response import Response from ZPublisher.Response import Response
from ZPublisher.Test import publish_module from ZPublisher.Test import publish_module
...@@ -1157,7 +1159,6 @@ def fortify(): ...@@ -1157,7 +1159,6 @@ def fortify():
system. system.
''' '''
# check that we don't store persistent objects in cache # check that we don't store persistent objects in cache
from pickle import dumps
from Products.ERP5Type.CachePlugins.BaseCache import CacheEntry from Products.ERP5Type.CachePlugins.BaseCache import CacheEntry
CacheEntry__init__ = CacheEntry.__init__ CacheEntry__init__ = CacheEntry.__init__
def __init__(self, value, *args, **kw): def __init__(self, value, *args, **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