Commit b4d41d7f authored by Ivan Tyagov's avatar Ivan Tyagov

Use proper method.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38792 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cc0acaa0
...@@ -2191,16 +2191,13 @@ class TestDocumentWithSecurity(TestDocumentMixin): ...@@ -2191,16 +2191,13 @@ class TestDocumentWithSecurity(TestDocumentMixin):
filename = 'REF-en-001.odt' filename = 'REF-en-001.odt'
upload_file = makeFileUpload(filename) upload_file = makeFileUpload(filename)
document = self.portal.portal_contributions.newContent(file=upload_file) document = self.portal.portal_contributions.newContent(file=upload_file)
self.stepTic()
transaction.commit()
self.tic()
document.submit() document.submit()
preview_html = document.Document_getPreviewAsHTML().replace('\n', ' ') preview_html = document.Document_getPreviewAsHTML().replace('\n', ' ')
transaction.commit() self.stepTic()
self.tic()
self.assert_('I use reference to look up TEST' in preview_html) self.assert_('I use reference to look up TEST' in preview_html)
...@@ -2218,8 +2215,7 @@ class TestDocumentWithSecurity(TestDocumentMixin): ...@@ -2218,8 +2215,7 @@ class TestDocumentWithSecurity(TestDocumentMixin):
f = makeFileUpload('Foo_001.odt') f = makeFileUpload('Foo_001.odt')
text_document.edit(file=f.read()) text_document.edit(file=f.read())
f.close() f.close()
transaction.commit() self.stepTic()
self.tic()
# the document should be automatically converted to html # the document should be automatically converted to html
self.assertEquals(text_document.getExternalProcessingState(), 'converted') self.assertEquals(text_document.getExternalProcessingState(), 'converted')
...@@ -2263,8 +2259,7 @@ class TestDocumentWithSecurity(TestDocumentMixin): ...@@ -2263,8 +2259,7 @@ class TestDocumentWithSecurity(TestDocumentMixin):
priority=Priority.USER) priority=Priority.USER)
self.portal.portal_workflow.doActionFor(user_pref, 'enable_action') self.portal.portal_workflow.doActionFor(user_pref, 'enable_action')
self.assertEqual(user_pref.getPreferenceState(), 'enabled') self.assertEqual(user_pref.getPreferenceState(), 'enabled')
transaction.commit() self.stepTic()
self.tic()
user_pref.setPreferredThumbnailImageHeight(default_thumbnail_image_height + 10) user_pref.setPreferredThumbnailImageHeight(default_thumbnail_image_height + 10)
user_pref.setPreferredThumbnailImageWidth(default_thumbnail_image_width + 10) user_pref.setPreferredThumbnailImageWidth(default_thumbnail_image_width + 10)
#Verify that the new values defined are the ones used by default #Verify that the new values defined are the ones used by default
......
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