Unused import flake8 error

This commit is contained in:
Carlos Almeida 2017-06-06 11:59:56 +01:00
parent 21526bd236
commit f1c5c8238b

View File

@ -28,6 +28,7 @@ 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)
@ -47,6 +48,7 @@ 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)