Commit 1b1974e2 authored by Nicolas Delaby's avatar Nicolas Delaby

cosmetic only

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35270 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8fa09ce0
...@@ -794,7 +794,7 @@ class TestDocument(TestDocumentMixin): ...@@ -794,7 +794,7 @@ class TestDocument(TestDocumentMixin):
if portal_type is not None: if portal_type is not None:
kw['portal_type'] = portal_type kw['portal_type'] = portal_type
return [x.getObject() for x in portal.portal_catalog(**kw)] return [x.getObject() for x in portal.portal_catalog(**kw)]
# full text search # full text search
self.assertSameSet([document_1], \ self.assertSameSet([document_1], \
getAdvancedSearchTextResultList('ScriptableKey')) getAdvancedSearchTextResultList('ScriptableKey'))
...@@ -1016,7 +1016,7 @@ class TestDocument(TestDocumentMixin): ...@@ -1016,7 +1016,7 @@ class TestDocument(TestDocumentMixin):
def test_11_SearchStringSearchCapability(self): def test_11_SearchStringSearchCapability(self):
""" """
Test search string search search capabilities. Test search string search capabilities.
""" """
portal = self.portal portal = self.portal
assemble = portal.Base_assembleSearchString assemble = portal.Base_assembleSearchString
...@@ -1200,9 +1200,10 @@ class TestDocument(TestDocumentMixin): ...@@ -1200,9 +1200,10 @@ class TestDocument(TestDocumentMixin):
upload_file = makeFileUpload('REF-en-001.pdf') upload_file = makeFileUpload('REF-en-001.pdf')
document = self.portal.portal_contributions.newContent(file=upload_file) document = self.portal.portal_contributions.newContent(file=upload_file)
self.assertEquals('PDF', document.getPortalType()) self.assertEquals('PDF', document.getPortalType())
content_type, image_data = document.convert(format='png', content_type, image_data = document.convert(format='png',
frame=0, frame=0,
display='thumbnail') display='thumbnail')
# it's a valid PNG # it's a valid PNG
self.assertEquals('PNG', image_data[1:4]) self.assertEquals('PNG', image_data[1:4])
...@@ -1237,8 +1238,7 @@ class TestDocument(TestDocumentMixin): ...@@ -1237,8 +1238,7 @@ class TestDocument(TestDocumentMixin):
upload_file = makeFileUpload('cmyk_sample.jpg') upload_file = makeFileUpload('cmyk_sample.jpg')
document = self.portal.portal_contributions.newContent(file=upload_file) document = self.portal.portal_contributions.newContent(file=upload_file)
self.assertEquals('Image', document.getPortalType()) self.assertEquals('Image', document.getPortalType())
self.assertEquals('ERP5 is a free software.\n', self.assertEquals('ERP5 is a free software.\n', document.asText())
document.SearchableText())
def test_Base_showFoundText(self): def test_Base_showFoundText(self):
# Create document with good content # Create document with good content
......
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