Commit b5f929f9 authored by Nicolas Delaby's avatar Nicolas Delaby

* Embed testing documents in package.

* in testLegacyInterface read files from installed package



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45091 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f36ce83e
......@@ -39,6 +39,7 @@ setup(
],
packages = find_packages('src'),
package_dir = {'': 'src'},
package_data = {'cloudooo.handler.ooo.tests.data': ['*']},
url = 'http://svn.erp5.org/repos/public/erp5/trunk/utils/cloudooo.handler.ooo',
namespace_packages = ["cloudooo", "cloudooo.handler"],
install_requires=install_requires,
......
......@@ -30,6 +30,7 @@ from xmlrpclib import ServerProxy
from base64 import encodestring, decodestring
from cloudooo.handler.tests.handlerTestCase import HandlerTestCase, make_suite
import magic
from pkg_resources import resource_filename
file_detector = magic.Magic(mime=True)
DAEMON = True
......@@ -45,7 +46,8 @@ class TestLegacyInterface(HandlerTestCase):
def testHtmlToBaseFormatConversion(self):
"""Check implicit base conversion of HTML documents.
"""
filename = 'data/test_failure_conversion.html'
filename = resource_filename('cloudooo.handler.ooo.tests.data',
'test_failure_conversion.html')
file_object = open(filename, 'r')
original_data = file_object.read()
file_object.close()
......@@ -64,7 +66,8 @@ class TestLegacyInterface(HandlerTestCase):
def testHtmlToOdt(self):
"""Check conversion of HTML to odt
"""
filename = 'data/test_failure_conversion.html'
filename = resource_filename('cloudooo.handler.ooo.tests.data',
'test_failure_conversion.html')
file_object = open(filename, 'r')
data = file_object.read()
file_object.close()
......
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