Commit 208e9123 authored by Ivan Tyagov's avatar Ivan Tyagov

Add test for converting to format which contain multiple '.'.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36867 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6570832c
......@@ -1283,6 +1283,15 @@ class TestDocument(TestDocumentMixin):
self.assertEquals(document.getStandardFileName(), 'metadata-001-en.pdf')
self.assertEquals(document.getStandardFileName(format='png'),
'metadata-001-en.png')
# check when format contains multiple '.'
upload_file = makeFileUpload('TEST-en-003.odp')
document = self.portal.document_module.newContent(portal_type='Presentation')
# Here we use edit instead of setFile,
# because only edit method set filename as source_reference.
document.edit(file=upload_file)
self.assertEquals(document.getStandardFileName(), 'TEST-en-003.odp')
self.assertEquals('TEST-en-003.odg', document.getStandardFileName(format='odp.odg'))
def test_CMYKImageTextContent(self):
upload_file = makeFileUpload('cmyk_sample.jpg')
......
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