Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
55cd18ec
Commit
55cd18ec
authored
Jan 26, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into lazy_simulation_causality
parents
8982ecde
b3c18ce8
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
349 additions
and
320 deletions
+349
-320
CHANGES.erp5.util.txt
CHANGES.erp5.util.txt
+1
-1
bt5/erp5_run_my_doc/PortalTypeTemplateItem/portal_types/Test%20Page.xml
...y_doc/PortalTypeTemplateItem/portal_types/Test%20Page.xml
+1
-0
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertPage.xml
...rtal_skins/erp5_run_my_doc/TestPageModule_convertPage.xml
+15
-12
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertToTestPage.xml
...kins/erp5_run_my_doc/TestPageModule_convertToTestPage.xml
+2
-2
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertToWebPage.xml
...skins/erp5_run_my_doc/TestPageModule_convertToWebPage.xml
+2
-2
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_listWebPages.xml
...tal_skins/erp5_run_my_doc/TestPageModule_listWebPages.xml
+0
-75
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_viewConvertToTestPagesDialog.xml
...un_my_doc/TestPageModule_viewConvertToTestPagesDialog.xml
+1
-1
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_viewConvertToTestPagesDialog/listbox.xml
...c/TestPageModule_viewConvertToTestPagesDialog/listbox.xml
+50
-22
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_viewConvertToWebPagesDialog.xml
...run_my_doc/TestPageModule_viewConvertToWebPagesDialog.xml
+1
-1
bt5/erp5_run_my_doc/TestTemplateItem/testRunMyDoc.py
bt5/erp5_run_my_doc/TestTemplateItem/testRunMyDoc.py
+90
-0
bt5/erp5_run_my_doc/bt/revision
bt5/erp5_run_my_doc/bt/revision
+1
-1
bt5/erp5_run_my_doc/bt/template_test_id_list
bt5/erp5_run_my_doc/bt/template_test_id_list
+1
-0
product/ERP5/tests/testERP5Web.py
product/ERP5/tests/testERP5Web.py
+178
-200
setup.py
setup.py
+6
-3
No files found.
CHANGES.erp5.util.txt
View file @
55cd18ec
...
@@ -38,5 +38,5 @@ Changes
...
@@ -38,5 +38,5 @@ Changes
0.1 (2011-08-08)
0.1 (2011-08-08)
----------------
----------------
* erp5.util.testnode imported from recipe
like slapos.cookbook
* erp5.util.testnode imported from recipe
-
like slapos.cookbook
[Łukasz Nowak]
[Łukasz Nowak]
bt5/erp5_run_my_doc/PortalTypeTemplateItem/portal_types/Test%20Page.xml
View file @
55cd18ec
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<key>
<string>
group_list
</string>
</key>
<key>
<string>
group_list
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
document
</string>
<string>
my_document
</string>
<string>
my_document
</string>
<string>
recent_document
</string>
<string>
recent_document
</string>
<string>
web_document
</string>
<string>
web_document
</string>
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertPage
s
.xml
→
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertPage.xml
View file @
55cd18ec
...
@@ -50,15 +50,19 @@
...
@@ -50,15 +50,19 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
if conv_obj_type == \'Web Page\':\n
<value>
<string>
# XXX (rafael) I beleave KM has a much better way to do this, \n
conv_module_path = \'/erp5/web_page_module\'\n
# clone web page.\n
else:\n
\n
conv_module_path = \'/erp5/test_page_module\'\n
conv_module_id = \'test_page_module\'\n
conv_obj_module = context.restrictedTraverse(conv_module_path)\n
\n
if conv_obj_type == \'Web Page\':\n
conv_module_id = \'web_page_module\'\n
\n
conv_obj_module = context.getDefaultModule(conv_obj_type)\n
counter = 0\n
counter = 0\n
for uid in uids:\n
for uid in uids:\n
counter += 1\n
counter += 1\n
obj = context.portal_catalog
(uid=uid)[0]
\n
obj = context.portal_catalog
.getResultValue(uid=uid)
\n
conv_obj = conv_obj_module.newContent(portal_type = conv_obj_type,\n
conv_obj = conv_obj_module.newContent(portal_type = conv_obj_type,\n
title = obj.getTitle(),\n
title = obj.getTitle(),\n
short_title = obj.getShortTitle(),\n
short_title = obj.getShortTitle(),\n
...
@@ -72,11 +76,10 @@ for uid in uids:\n
...
@@ -72,11 +76,10 @@ for uid in uids:\n
text_content = obj.getTextContent(),\n
text_content = obj.getTextContent(),\n
format = obj.getFormat(),\n
format = obj.getFormat(),\n
contributor_list = obj.getContributorList())\n
contributor_list = obj.getContributorList())\n
try:\n
\n
context.restrictedTraverse(conv_module_path)\n
conv_obj = conv_obj.manage_pasteObjects(\n
except:\n
obj.manage_copyObjects(\n
conv_obj.setId(obj.getId())\n
map(lambda x: x.getId(), obj.objectValues())))\n
conv_obj = conv_obj.manage_pasteObjects(obj.manage_copyObjects(map(lambda x: x.getId(), obj.objectValues())))\n
\n
\n
return conv_obj_module.Base_redirect(\'\', dict(portal_status_message=context.Base_translateString(str(counter) + " object(s) converted.")))\n
return conv_obj_module.Base_redirect(\'\', dict(portal_status_message=context.Base_translateString(str(counter) + " object(s) converted.")))\n
</string>
</value>
</string>
</value>
...
@@ -87,7 +90,7 @@ return conv_obj_module.Base_redirect(\'\', dict(portal_status_message=context.Ba
...
@@ -87,7 +90,7 @@ return conv_obj_module.Base_redirect(\'\', dict(portal_status_message=context.Ba
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
TestPageModule_convertPage
s
</string>
</value>
<value>
<string>
TestPageModule_convertPage
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertTo
WebPages
.xml
→
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertTo
TestPage
.xml
View file @
55cd18ec
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
return context.TestPageModule_convertPage
s(uids, \'Web
Page\')\n
<value>
<string>
return context.TestPageModule_convertPage
(uids, \'Test
Page\')\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
TestPageModule_convertTo
WebPages
</string>
</value>
<value>
<string>
TestPageModule_convertTo
TestPage
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertTo
TestPages
.xml
→
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_convertTo
WebPage
.xml
View file @
55cd18ec
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
return context.TestPageModule_convertPage
s(uids, \'Test
Page\')\n
<value>
<string>
return context.TestPageModule_convertPage
(uids, \'Web
Page\')\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
TestPageModule_convertTo
TestPages
</string>
</value>
<value>
<string>
TestPageModule_convertTo
WebPage
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_listWebPages.xml
deleted
100644 → 0
View file @
8982ecde
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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>
"""\n
Fetches Web Pages from the Web Page Module\n
"""\n
element_list = context.restrictedTraverse(\'/erp5/web_page_module\').objectValues()\n
\n
for sorted_element in sort_on:\n
element_list = sorted(element_list, key = lambda x: x.getProperty(sorted_element[0]), reverse = sorted_element[1] == \'descending\')\n
\n
return element_list\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
sort_on = [], **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TestPageModule_listWebPages
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_viewConvertToTestPagesDialog.xml
View file @
55cd18ec
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
action
</string>
</key>
<key>
<string>
action
</string>
</key>
<value>
<string>
TestPageModule_convertToTestPage
s
</string>
</value>
<value>
<string>
TestPageModule_convertToTestPage
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_viewConvertToTestPagesDialog/listbox.xml
View file @
55cd18ec
...
@@ -15,10 +15,12 @@
...
@@ -15,10 +15,12 @@
<string>
count_method
</string>
<string>
count_method
</string>
<string>
domain_root_list
</string>
<string>
domain_root_list
</string>
<string>
domain_tree
</string>
<string>
domain_tree
</string>
<string>
editable_columns
</string>
<string>
lines
</string>
<string>
lines
</string>
<string>
list_method
</string>
<string>
list_method
</string>
<string>
portal_types
</string>
<string>
selection_name
</string>
<string>
selection_name
</string>
<string>
sort
</string>
<string>
sort_columns
</string>
<string>
title
</string>
<string>
title
</string>
</list>
</list>
</value>
</value>
...
@@ -167,10 +169,6 @@
...
@@ -167,10 +169,6 @@
<string>
language
</string>
<string>
language
</string>
<string>
Language
</string>
<string>
Language
</string>
</tuple>
</tuple>
<tuple>
<string>
int_index
</string>
<string>
Index
</string>
</tuple>
<tuple>
<tuple>
<string>
translated_validation_state_title
</string>
<string>
translated_validation_state_title
</string>
<string>
State
</string>
<string>
State
</string>
...
@@ -197,21 +195,6 @@
...
@@ -197,21 +195,6 @@
<key>
<string>
domain_tree
</string>
</key>
<key>
<string>
domain_tree
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
1
</int>
</value>
</item>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
creation_date
</string>
<string>
Creation Date
</string>
</tuple>
<tuple>
<string>
modification_date
</string>
<string>
Modification Date
</string>
</tuple>
</list>
</value>
</item>
<item>
<item>
<key>
<string>
field_id
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_mode_listbox
</string>
</value>
<value>
<string>
my_list_mode_listbox
</string>
</value>
...
@@ -230,9 +213,54 @@
...
@@ -230,9 +213,54 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<list>
<tuple>
<string>
Web Page
</string>
<string>
Web Page
</string>
</tuple>
</list>
</value>
</item>
<item>
<item>
<key>
<string>
selection_name
</string>
</key>
<key>
<string>
selection_name
</string>
</key>
<value>
<string>
web_page_module_view_web_page_list_selection
</string>
</value>
<value>
<string>
test_page_view_web_page_list_selection
</string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<list>
<tuple>
<string>
id
</string>
<string>
ID
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
id
</string>
<string>
ID
</string>
</tuple>
<tuple>
<string>
reference
</string>
<string>
Reference
</string>
</tuple>
<tuple>
<string>
short_title
</string>
<string>
Short Title
</string>
</tuple>
<tuple>
<string>
title
</string>
<string>
Long Title
</string>
</tuple>
</list>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
target
</string>
</key>
<key>
<string>
target
</string>
</key>
...
@@ -256,7 +284,7 @@
...
@@ -256,7 +284,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
method_name
</string>
</key>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
TestPageModule_listWebPages
</string>
</value>
<value>
<string>
portal_catalog
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPageModule_viewConvertToWebPagesDialog.xml
View file @
55cd18ec
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
action
</string>
</key>
<key>
<string>
action
</string>
</key>
<value>
<string>
TestPageModule_convertToWebPage
s
</string>
</value>
<value>
<string>
TestPageModule_convertToWebPage
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
...
...
bt5/erp5_run_my_doc/TestTemplateItem/testRunMyDoc.py
0 → 100644
View file @
55cd18ec
##############################################################################
#
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestRunMyDoc
(
ERP5TypeTestCase
):
"""
Basic Test for internal implementation of RunMyDocs
"""
def
getTitle
(
self
):
return
"Run My Doc"
def
getBusinessTemplateList
(
self
):
"""
Tuple of Business Templates we need to install
"""
# Include all list here.
return
[
'erp5_base'
'erp5_jquery'
'erp5_jquery_ui'
'erp5_knowledge_pad'
'erp5_web'
'erp5_dms'
'erp5_slideshow_style'
'erp5_ui_test_core'
,
'erp5_run_my_doc'
]
def
afterSetUp
(
self
):
"""
This is ran before anything, used to set the environment
"""
# here, you can create the categories and objects your test will depend on
pass
website_id
=
"test_page_web_site"
def
test_getDocumentListWithTestPage
(
self
):
"""
Assert if Test Page works with getDocumentList
"""
test_page_reference
=
"developer-my.test.page"
website
=
getattr
(
self
.
portal
.
web_site_module
,
self
.
website_id
,
None
)
if
website
is
None
:
website
=
self
.
portal
.
web_site_module
.
newContent
(
portal_type
=
'Web Site'
,
id
=
self
.
website_id
)
website
.
publish
()
self
.
stepTic
()
test_page
=
self
.
portal
.
test_page_module
.
newContent
(
portal_type
=
"Test Page"
,
reference
=
test_page_reference
,
language
=
"en"
,
version
=
"001"
)
test_page
.
publish
()
self
.
stepTic
()
document
=
website
.
WebSection_getDocumentValue
(
test_page_reference
)
self
.
assertNotEquals
(
None
,
document
)
self
.
assertEquals
(
document
.
getRelativeUrl
(),
test_page
.
getRelativeUrl
())
\ No newline at end of file
bt5/erp5_run_my_doc/bt/revision
View file @
55cd18ec
6
9
\ No newline at end of file
\ No newline at end of file
bt5/erp5_run_my_doc/bt/template_test_id_list
0 → 100644
View file @
55cd18ec
testRunMyDoc
\ No newline at end of file
product/ERP5/tests/testERP5Web.py
View file @
55cd18ec
This diff is collapsed.
Click to expand it.
setup.py
View file @
55cd18ec
...
@@ -63,9 +63,12 @@ setup(name=name,
...
@@ -63,9 +63,12 @@ setup(name=name,
entry_points
=
{
entry_points
=
{
'console_scripts'
:
[
'console_scripts'
:
[
'testnode = erp5.util.testnode:main [testnode]'
,
'testnode = erp5.util.testnode:main [testnode]'
,
'performance_tester_erp5 = erp5.util.benchmark.performance_tester:main [benchmark]'
,
'performance_tester_erp5 = '
\
'scalability_tester_erp5 = erp5.util.benchmark.scalability_tester:main [scalability_tester]'
,
'erp5.util.benchmark.performance_tester:main [benchmark]'
,
'generate_erp5_tester_report = erp5.util.benchmark.report:generateReport [benchmark-report]'
,
'scalability_tester_erp5 = '
\
'erp5.util.benchmark.scalability_tester:main [scalability_tester]'
,
'generate_erp5_tester_report = '
\
'erp5.util.benchmark.report:generateReport [benchmark-report]'
,
'web_checker_utility = erp5.util.webchecker:web_checker_utility'
'web_checker_utility = erp5.util.webchecker:web_checker_utility'
],
],
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment