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 @@ ...@@ -31,10 +31,10 @@
import os import os
from Products.ERP5Configurator import tests 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( return os.path.join(
os.path.abspath( os.path.abspath(
os.path.dirname(tests.__file__)),'test_data') os.path.dirname(tests.__file__)),'test_data/%s' % filename)
...@@ -2,74 +2,26 @@ ...@@ -2,74 +2,26 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>_function</string> </key>
<value> <int>3</int> </value> <value> <string>Zuite_getTestDocumentsHome</string> </value>
</item> </item>
<item> <item>
<key> <string>_bind_names</string> </key> <key> <string>_module</string> </key>
<value> <value> <string>ConfiguratorTestUtils</string> </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>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Zuite_getConfiguratorFilenameLocation</string> </value> <value> <string>Zuite_getConfiguratorFilenameLocation</string> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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