Commit 3e67c274 authored by Rafael Monnerat's avatar Rafael Monnerat

Merge code into single script.

This make code of bt5 a bit smaller
parent f5e15283
......@@ -31,10 +31,10 @@
import os
from Products.ERP5Configurator import tests
def Zuite_getTestDocumentsHome(self):
def Zuite_getTestDocumentPath(self, filename):
"""
Get test documents folder as string.
Get the full path of the document to be used into the test.
"""
return os.path.join(
os.path.abspath(
os.path.dirname(tests.__file__)),'test_data')
os.path.dirname(tests.__file__)),'test_data/%s' % filename)
......@@ -2,74 +2,26 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
<key> <string>_function</string> </key>
<value> <string>Zuite_getTestDocumentsHome</string> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>test_documents_home = context.Zuite_getConfiguratorTestDocumentsHome()\n
return \'%s/%s\' %(test_documents_home, filename)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>filename</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
<key> <string>_module</string> </key>
<value> <string>ConfiguratorTestUtils</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_getConfiguratorFilenameLocation</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>Zuite_getTestDocumentsHome</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ConfiguratorTestUtils</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_getConfiguratorTestDocumentsHome</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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