Commit c97ca158 authored by Ivan Tyagov's avatar Ivan Tyagov

Fix testDms to not call stepTic which is not required.

Start preconversion in a separate serialize able activity.
parent e82f7689
...@@ -52,14 +52,16 @@ ...@@ -52,14 +52,16 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
portal_id = portal.getId()\n portal_id = portal.getId()\n
MARKER = (None, \'\',)\n
\n \n
for index_uid in range(len(uid)):\n for index_uid in range(len(uid)):\n
document_relative_url = getPath[index_uid].replace("/%s/" %portal_id, "")\n document_relative_url = getPath[index_uid].replace("/%s/" %portal_id, "")\n
document = portal.restrictedTraverse(document_relative_url)\n document = portal.restrictedTraverse(document_relative_url)\n
if getattr(document, "convert", None) is not None and \\\n if getattr(document, "convert", None) is not None and \\\n
getattr(document, "getData", None) is not None and \\\n getattr(document, "getData", None) is not None and \\\n
(document.getData() not in (None, \'\',) or document.getBaseData() not in (None, \'\',)):\n (document.getData() not in MARKER or document.getBaseData() not in MARKER):\n
document.Base_preConvert()\n #context.log("preconvert %s" %document.getRelativeUrl())\n
document.activate(serialize_tag="conversion").Base_preConvert()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
1 2
\ No newline at end of file \ No newline at end of file
...@@ -1350,7 +1350,6 @@ class TestDocument(TestDocumentMixin): ...@@ -1350,7 +1350,6 @@ class TestDocument(TestDocumentMixin):
# Delete base_data # Delete base_data
document.edit(base_data=None) document.edit(base_data=None)
self.stepTic()
# As document is not converted, text conversion is impossible # As document is not converted, text conversion is impossible
self.assertRaises(NotConvertedError, document.asText) self.assertRaises(NotConvertedError, document.asText)
......
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