Commit 8372e5d0 authored by Priscila Manhaes's avatar Priscila Manhaes

refactor to skip tests that are expected to fail

parent cbae451d
...@@ -34,6 +34,7 @@ from lxml import etree ...@@ -34,6 +34,7 @@ from lxml import etree
from types import DictType from types import DictType
from zipfile import ZipFile, is_zipfile from zipfile import ZipFile, is_zipfile
from cloudooo.tests.cloudoooTestCase import TestCase, make_suite from cloudooo.tests.cloudoooTestCase import TestCase, make_suite
from cloudooo.tests.backportUnittest import skip
class TestServer(TestCase): class TestServer(TestCase):
...@@ -146,13 +147,6 @@ class TestServer(TestCase): ...@@ -146,13 +147,6 @@ class TestServer(TestCase):
"opendocument.text"), "opendocument.text"),
# Test export python to pdf # Test export python to pdf
(__file__, "py", "pdf", "application/pdf"), (__file__, "py", "pdf", "application/pdf"),
# Test if send a zipfile returns a document correctly
(join('data', 'test.zip'), "zip", "txt", "application/zip", True),
# Convert compressed html to txt
(join('data', 'test.zip'), "zip", "txt", "text/plain"),
# Test export pptx to odp
(join('data', 'test.pptx'), "pptx", "odp", "application/vnd.oasis."+
"opendocument.presentation"),
] ]
def testConvert(self): def testConvert(self):
...@@ -173,6 +167,20 @@ class TestServer(TestCase): ...@@ -173,6 +167,20 @@ class TestServer(TestCase):
"""Test fail convertion of Invalid OOofiles""" """Test fail convertion of Invalid OOofiles"""
self.runFaultConversionList(self.FaultConversionScenarioList()) self.runFaultConversionList(self.FaultConversionScenarioList())
@skip('Expected failure')
def testConvertWithoutSupport(self):
"""Test convertion of zip files and pptx"""
self.runConversionList([
# Test if send a zipfile returns a document correctly
(join('data', 'test.zip'), "zip", "txt", "application/zip", True),
# Convert compressed html to txt
(join('data', 'test.zip'), "zip", "txt", "text/plain"),
# Test export pptx to odp
(join('data', 'test.pptx'), "pptx", "odp", "application/vnd.oasis."+
"opendocument.presentation"),
])
def GetMetadataScenarioList(self): def GetMetadataScenarioList(self):
return [ return [
# Test method getFileMetadataItemList. Without data converted # Test method getFileMetadataItemList. Without data converted
...@@ -352,8 +360,7 @@ class TestServer(TestCase): ...@@ -352,8 +360,7 @@ class TestServer(TestCase):
# XXX: This is a test for ERP5 Backward compatibility, # XXX: This is a test for ERP5 Backward compatibility,
# and the support to this kind of tests will be dropped. # and the support to this kind of tests will be dropped.
# XXX disable this test because LibreOffice 3.3 can open such a broken @skip('LibreOffice 3.3 can open such a broken document and convert')
# document.
def testRunGenerateMethodFailResponse(self): def testRunGenerateMethodFailResponse(self):
"""Test run_generate method with invalid document""" """Test run_generate method with invalid document"""
data = open(join('data', 'test.odt'), 'r').read()[:100] data = open(join('data', 'test.odt'), 'r').read()[:100]
......
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