Commit f2ac1c36 authored by Nicolas Delaby's avatar Nicolas Delaby

edit method reset cache of current document because it increase the revision.

Use setId to check that changing an id of cachable document doesn't
clear conversion cache.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35016 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c36b33f6
...@@ -1021,9 +1021,9 @@ Hé Hé Hé!""", page.asText().strip()) ...@@ -1021,9 +1021,9 @@ Hé Hé Hé!""", page.asText().strip())
# Make sure document cache keeps converted content even if ID changes # Make sure document cache keeps converted content even if ID changes
self.assertTrue(document.hasConversion(format='txt')) self.assertTrue(document.hasConversion(format='txt'))
document.edit(id='document_new_cache') document.setId('document_new_cache')
self.assertTrue(document.hasConversion(format='txt')) self.assertTrue(document.hasConversion(format='txt'))
document.edit(id='document_original_cache') document.setId('document_original_cache')
self.assertTrue(document.hasConversion(format='txt')) self.assertTrue(document.hasConversion(format='txt'))
def test_13b_DocumentEditCacheKey(self, quiet=quiet, run=run_all_test): def test_13b_DocumentEditCacheKey(self, quiet=quiet, run=run_all_test):
......
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