Browse Source

publish muk_converter - 11.0

pull/6/head
MuK IT GmbH 6 years ago
parent
commit
c52c45d3e4
  1. 10
      muk_converter/tests/test_converter.py
  2. 4
      muk_converter/tests/test_unoconv.py

10
muk_converter/tests/test_converter.py

@ -19,6 +19,7 @@
import os
import logging
import unittest
from odoo.tests import common
@ -37,15 +38,18 @@ class ConverterTestCase(common.TransactionCase):
def test_formats(self):
self.assertTrue(converter.formats())
@unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI")
def test_convert(self):
with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file:
self.assertTrue(converter.convert('sample.png', file.read(), "pdf"))
@unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI")
def test_convert2pdf(self):
with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file:
self.assertTrue(converter.convert2pdf('sample.png', file.read()))
@unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI")
def test_convert2html(self):
with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file:
self.assertTrue(converter.convert2html('sample.png', file.read()))

4
muk_converter/tests/test_unoconv.py

@ -19,6 +19,7 @@
import os
import logging
import unittest
from odoo.tests import common
@ -34,7 +35,8 @@ class UnoconvTestCase(common.TransactionCase):
def tearDown(self):
super(UnoconvTestCase, self).tearDown()
@unittest.skipIf(os.environ.get('TRAVIS', False), "Skipped for Travis CI")
def test_convert_binary(self):
with open(os.path.join(_path, 'tests/data', 'sample.png'), 'rb') as file:
self.assertTrue(unoconv.convert_binary(file.read()))
Loading…
Cancel
Save