Commit 4f98b14f authored by Ivan Tyagov's avatar Ivan Tyagov

Add basic testing for Base_isConvertible.

parent 9641c1ea
...@@ -64,6 +64,23 @@ class TestDocumentWithPreConversion(TestDocument): ...@@ -64,6 +64,23 @@ class TestDocumentWithPreConversion(TestDocument):
'Embedded-XXX?format=jpeg&display=large&quality=75'], 'Embedded-XXX?format=jpeg&display=large&quality=75'],
web_page.Base_extractImageUrlList()) web_page.Base_extractImageUrlList())
def test_Base_isConvertible(self):
"""
Test pre converion only happens on proper documents.
"""
print "da"
image = self.portal.image_module.newContent(portal_type='Image',
reference='Embedded-XXX',
version='001',
language='en')
# empty image is not convertible
self.assertEqual(False, image.Base_isConvertible())
# image with data is convertible
upload_file = makeFileUpload('cmyk_sample.jpg')
image.edit(file=upload_file)
self.tic()
self.assertEqual(True, image.Base_isConvertible())
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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