Commit d90ab62b authored by Gabriel Monnerat's avatar Gabriel Monnerat

clean up the tests

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42190 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7a356983
...@@ -4,12 +4,11 @@ import sys ...@@ -4,12 +4,11 @@ import sys
import unittest import unittest
from argparse import ArgumentParser from argparse import ArgumentParser
from time import sleep from time import sleep
from subprocess import Popen
from cloudooo.handler.ooo.utils.utils import socketStatus from cloudooo.handler.ooo.utils.utils import socketStatus
from ConfigParser import ConfigParser from ConfigParser import ConfigParser
from os import chdir, path, environ, curdir from os import chdir, path, environ, curdir
from subprocess import Popen, PIPE
import tempfile import tempfile
import os
ENVIRONMENT_PATH = path.abspath(path.dirname(__file__)) ENVIRONMENT_PATH = path.abspath(path.dirname(__file__))
...@@ -66,11 +65,8 @@ def run(): ...@@ -66,11 +65,8 @@ def run():
config = ConfigParser() config = ConfigParser()
config.read(server_cloudooo_conf) config.read(server_cloudooo_conf)
openoffice_port = int(config.get("app:main", "openoffice_port")) openoffice_port = int(config.get("app:main", "openoffice_port"))
xvfb_port = int(config.get("app:main", "virtual_display_port"))
xvfb_display_id = int(config.get("app:main", "virtual_display_id"))
hostname = config.get("app:main", "application_hostname") hostname = config.get("app:main", "application_hostname")
server_port = int(config.get("server:main", "port")) server_port = int(config.get("server:main", "port"))
run_dir = config.get('app:main', 'working_path')
module = __import__(test_name) module = __import__(test_name)
if not hasattr(module, "test_suite"): if not hasattr(module, "test_suite"):
exit("No test suite to run, exiting immediately") exit("No test suite to run, exiting immediately")
...@@ -109,7 +105,7 @@ def run(): ...@@ -109,7 +105,7 @@ def run():
stopFakeEnvironment() stopFakeEnvironment()
elif XVFB: elif XVFB:
chdir(ENVIRONMENT_PATH) chdir(ENVIRONMENT_PATH)
xvfb = startFakeEnvironment(start_openoffice=False, startFakeEnvironment(start_openoffice=False,
conf_path=server_cloudooo_conf) conf_path=server_cloudooo_conf)
try: try:
TestRunner(verbosity=2).run(suite) TestRunner(verbosity=2).run(suite)
......
...@@ -57,6 +57,3 @@ class TestFilter(unittest.TestCase): ...@@ -57,6 +57,3 @@ class TestFilter(unittest.TestCase):
def test_suite(): def test_suite():
return make_suite(TestFilter) return make_suite(TestFilter)
if __name__ == "__main__":
suite = unittest.TestLoader().loadTestsFromTestCase(TestFilter)
unittest.TextTestRunner(verbosity=2).run(suite)
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
# #
############################################################################## ##############################################################################
import unittest
import os
import subprocess
from xmlrpclib import ServerProxy from xmlrpclib import ServerProxy
from base64 import encodestring, decodestring from base64 import encodestring, decodestring
from multiprocessing import Process, Array from multiprocessing import Process, Array
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# #
############################################################################## ##############################################################################
import unittest
import cloudooo.handler.ooo.monitor as monitor import cloudooo.handler.ooo.monitor as monitor
from cloudoooTestCase import CloudoooTestCase, make_suite from cloudoooTestCase import CloudoooTestCase, make_suite
from cloudooo.handler.ooo.monitor.request import MonitorRequest from cloudooo.handler.ooo.monitor.request import MonitorRequest
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# #
############################################################################## ##############################################################################
import unittest
from zipfile import ZipFile from zipfile import ZipFile
from StringIO import StringIO from StringIO import StringIO
from lxml import etree from lxml import etree
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
# #
############################################################################## ##############################################################################
import unittest
import json import json
import pkg_resources import pkg_resources
from cloudooo.handler.ooo.application.openoffice import openoffice from cloudooo.handler.ooo.application.openoffice import openoffice
......
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