Commit a86e8332 authored by Gabriel Monnerat's avatar Gabriel Monnerat

remove not used imports and function

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42256 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d7f9d1ca
...@@ -5,7 +5,6 @@ import unittest ...@@ -5,7 +5,6 @@ import unittest
from argparse import ArgumentParser from argparse import ArgumentParser
from time import sleep from time import sleep
from subprocess import Popen from subprocess import Popen
from cloudooo.handler.ooo.utils.utils import socketStatus
from ConfigParser import ConfigParser from ConfigParser import ConfigParser
from os import chdir, path, environ, curdir, remove from os import chdir, path, environ, curdir, remove
from psutil import Process from psutil import Process
...@@ -13,13 +12,6 @@ from psutil import Process ...@@ -13,13 +12,6 @@ from psutil import Process
ENVIRONMENT_PATH = path.abspath(path.dirname(__file__)) ENVIRONMENT_PATH = path.abspath(path.dirname(__file__))
def wait_liberate_port(hostname, port, timeout_limit=30):
for n in range(timeout_limit):
if not socketStatus(hostname, port):
break
sleep(1)
def wait_use_port(pid, timeout_limit=30): def wait_use_port(pid, timeout_limit=30):
process = Process(pid) process = Process(pid)
for n in range(timeout_limit): for n in range(timeout_limit):
......
...@@ -31,8 +31,7 @@ import magic ...@@ -31,8 +31,7 @@ import magic
from StringIO import StringIO from StringIO import StringIO
from base64 import decodestring from base64 import decodestring
from os import path from os import path
from os import remove from zipfile import ZipFile
from zipfile import ZipFile, is_zipfile
from cloudooo.handler.ooo.document import FileSystemDocument from cloudooo.handler.ooo.document import FileSystemDocument
from cloudoooTestCase import make_suite from cloudoooTestCase import make_suite
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# #
############################################################################## ##############################################################################
import unittest
from zipfile import ZipFile from zipfile import ZipFile
from lxml import etree from lxml import etree
from cloudoooTestCase import CloudoooTestCase, make_suite from cloudoooTestCase import CloudoooTestCase, make_suite
...@@ -59,6 +58,7 @@ class TestOdfDocument(CloudoooTestCase): ...@@ -59,6 +58,7 @@ class TestOdfDocument(CloudoooTestCase):
def testParseContent(self): def testParseContent(self):
"""Test if the _parsed_content attribute is the parsed content.xml""" """Test if the _parsed_content attribute is the parsed content.xml"""
# XXX not sure it is good to store parsed document everytime
self.assertTrue(isinstance(self.oodocument.parsed_content, etree._Element)) self.assertTrue(isinstance(self.oodocument.parsed_content, etree._Element))
self.assertTrue(self.oodocument.parsed_content.tag.endswith( self.assertTrue(self.oodocument.parsed_content.tag.endswith(
'document-content')) 'document-content'))
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# #
############################################################################## ##############################################################################
import unittest
from cloudoooTestCase import CloudoooTestCase from cloudoooTestCase import CloudoooTestCase
from cloudooo.handler.ooo.application.openoffice import OpenOffice from cloudooo.handler.ooo.application.openoffice import OpenOffice
from cloudoooTestCase import make_suite from cloudoooTestCase import make_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