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

remove unneeded import


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16674 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2802e83c
...@@ -27,32 +27,16 @@ ...@@ -27,32 +27,16 @@
############################################################################## ##############################################################################
import unittest
import os import os
import sys import sys
import cStringIO
from xml.dom.minidom import parseString
import zipfile
from cgi import FieldStorage
from zLOG import LOG from zLOG import LOG
from zExceptions import BadRequest
from Testing import ZopeTestCase from Testing import ZopeTestCase
from DateTime import DateTime
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Utils import convertToUpperCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.Cache import clearCache
from Products.ERP5OOo.Document.OOoDocument import ConversionError
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
# Needed in order to have a log file inside the current folder
os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
os.environ['EVENT_LOG_SEVERITY'] = '-300'
ooodoc_coordinates = ('127.0.0.1', 8008) ooodoc_coordinates = ('127.0.0.1', 8008)
testrun = () testrun = ()
...@@ -116,21 +100,18 @@ class TestOOoImport(ERP5TypeTestCase): ...@@ -116,21 +100,18 @@ class TestOOoImport(ERP5TypeTestCase):
""" """
return ('erp5_base',) return ('erp5_base',)
def afterSetUp(self, quiet=QUIET, run=RUN_ALL_TEST): def afterSetUp(self):
""" """
Initialize the ERP5 site. Initialize the ERP5 site.
""" """
self.login() self.login()
self.datetime = DateTime()
self.portal = self.getPortal()
self.portal_categories = self.getCategoryTool() self.portal_categories = self.getCategoryTool()
self.portal_catalog = self.getCatalogTool()
################################## ##################################
## Useful methods ## Useful methods
################################## ##################################
def login(self, quiet=QUIET, run=RUN_ALL_TEST): def login(self):
""" """
Create a new manager user and login. Create a new manager user and login.
""" """
...@@ -202,11 +183,7 @@ class TestOOoImport(ERP5TypeTestCase): ...@@ -202,11 +183,7 @@ class TestOOoImport(ERP5TypeTestCase):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self, quiet=quiet) sequence_list.play(self, quiet=quiet)
if __name__ == '__main__': def test_suite():
framework() suite = unittest.TestSuite()
else: suite.addTest(unittest.makeSuite(TestOOoImport))
import unittest return suite
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestOOoImport))
return suite
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