mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 18:38:41 -06:00
Deal with unused import
This commit is contained in:
parent
f1c5c8238b
commit
b22221023c
@ -4,7 +4,8 @@
|
|||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
|
|
||||||
from PIL import Image, ImageDraw, ImageFont, PdfImagePlugin, PalmImagePlugin
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
from PIL import PdfImagePlugin, PalmImagePlugin # pylint: disable=unused-import
|
||||||
from odoo.tests.common import TransactionCase
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
from ..models.ir_attachment import _MARKER_PHRASE
|
from ..models.ir_attachment import _MARKER_PHRASE
|
||||||
@ -28,7 +29,6 @@ class TestDocumentOcr(TransactionCase):
|
|||||||
self.assertEqual(result.strip(), 'Hello world')
|
self.assertEqual(result.strip(), 'Hello world')
|
||||||
# should also work for pdfs
|
# should also work for pdfs
|
||||||
data = StringIO()
|
data = StringIO()
|
||||||
PdfImagePlugin # to use import :/
|
|
||||||
test_image.save(data, 'pdf', resolution=300)
|
test_image.save(data, 'pdf', resolution=300)
|
||||||
result = attachment._index(
|
result = attachment._index(
|
||||||
data.getvalue(), 'test.pdf', None)
|
data.getvalue(), 'test.pdf', None)
|
||||||
@ -48,7 +48,6 @@ class TestDocumentOcr(TransactionCase):
|
|||||||
'document_ocr.synchronous', 'True')
|
'document_ocr.synchronous', 'True')
|
||||||
data = StringIO()
|
data = StringIO()
|
||||||
test_image = Image.new('1', (200, 30))
|
test_image = Image.new('1', (200, 30))
|
||||||
PalmImagePlugin # to use import :/
|
|
||||||
test_image.save(data, 'palm')
|
test_image.save(data, 'palm')
|
||||||
result = attachment._index(
|
result = attachment._index(
|
||||||
data.getvalue(), 'test.palm', None)
|
data.getvalue(), 'test.palm', None)
|
||||||
|
Loading…
Reference in New Issue
Block a user