Commit 72e2b857 authored by Jérome Perrin's avatar Jérome Perrin

tests: don't patch _startProcess in test

We want the test to test the actual code being ran as much as
possible, patching here seems not needed anymore.
parent 87001ce3
Pipeline #27909 failed with stage
in 0 seconds
......@@ -110,27 +110,6 @@ def stopFakeEnvironment(stop_openoffice=True):
openoffice.stop()
return True
if 1:
from cloudooo.handler.ooo.application.openoffice import OpenOffice
from cloudooo.handler.ooo.util import waitStartDaemon, waitStopDaemon
from subprocess import Popen, PIPE
# patch OpenOffice._startProcess not to put bogus output to stderr,
# that prevents detecting the end of unit test.
def _startProcess(self, command, env):
"""Start OpenOffice.org process"""
for i in range(5):
self.stop()
waitStopDaemon(self, self.timeout)
self.process = Popen(command, stderr=PIPE,
close_fds=True,
env=env)
if not waitStartDaemon(self, self.timeout):
continue
if self._testOpenOffice(self.hostname, self.port):
return
OpenOffice._startProcess = _startProcess
class HandlerTestCase(unittest.TestCase):
"""Test Case to load cloudooo conf."""
......
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