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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
erp5
Commits
7153d667
Commit
7153d667
authored
Sep 15, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: erp5_forge: Migrate testTemplateTool.
parent
bbaf3f5d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
122 additions
and
10 deletions
+122
-10
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py
...plateItem/portal_components/test.erp5.testTemplateTool.py
+7
-8
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.xml
...lateItem/portal_components/test.erp5.testTemplateTool.xml
+110
-0
bt5/erp5_forge/bt/template_test_id_list
bt5/erp5_forge/bt/template_test_id_list
+2
-1
bt5/erp5_forge/bt/test_dependency_list
bt5/erp5_forge/bt/test_dependency_list
+3
-1
No files found.
product/ERP5/tests/
testTemplateTool.py
→
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.
testTemplateTool.py
View file @
7153d667
...
@@ -51,7 +51,6 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -51,7 +51,6 @@ class TestTemplateTool(ERP5TypeTestCase):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_full_text_mroonga_catalog'
,
'erp5_full_text_mroonga_catalog'
,
'erp5_base'
,
'erp5_base'
,
'erp5_stock_cache'
,
'erp5_csv_style'
,
'erp5_csv_style'
,
'erp5_crm'
,
'erp5_crm'
,
'erp5_forge'
)
'erp5_forge'
)
...
@@ -353,7 +352,7 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -353,7 +352,7 @@ class TestTemplateTool(ERP5TypeTestCase):
try
:
try
:
bt
.
export
(
root
,
local
=
1
)
bt
.
export
(
root
,
local
=
1
)
with
open
(
os
.
path
.
join
(
root
,
'bt'
,
'title'
))
as
f
:
with
open
(
os
.
path
.
join
(
root
,
'bt'
,
'title'
))
as
f
:
self
.
assert
True
(
'test_core'
,
f
.
read
())
self
.
assert
Equal
(
'test_core'
,
f
.
read
())
# We don't export revision anymore.
# We don't export revision anymore.
self
.
assertFalse
(
os
.
path
.
exists
(
os
.
path
.
join
(
root
,
'bt'
,
'revision'
)))
self
.
assertFalse
(
os
.
path
.
exists
(
os
.
path
.
join
(
root
,
'bt'
,
'revision'
)))
# Computed at download ...
# Computed at download ...
...
@@ -424,7 +423,7 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -424,7 +423,7 @@ class TestTemplateTool(ERP5TypeTestCase):
'http://www.erp5.org/dists/snapshot/bt5/erp5_base.bt5'
)
'http://www.erp5.org/dists/snapshot/bt5/erp5_base.bt5'
)
self
.
assertEqual
(
getBusinessTemplateUrl
(
url_list
[
2
:],
exist_bt5
),
self
.
assertEqual
(
getBusinessTemplateUrl
(
url_list
[
2
:],
exist_bt5
),
'http://www.erp5.org/dists/release/5.4.5/bt5/erp5_base.bt5'
)
'http://www.erp5.org/dists/release/5.4.5/bt5/erp5_base.bt5'
)
INSTANCE_HOME
=
getConfiguration
().
instancehome
INSTANCE_HOME
=
getConfiguration
().
instancehome
# pylint: disable=redefined-builtin
local_bt
=
None
local_bt
=
None
if
os
.
path
.
exists
(
INSTANCE_HOME
+
"/bt5/erp5_base"
):
if
os
.
path
.
exists
(
INSTANCE_HOME
+
"/bt5/erp5_base"
):
local_bt
=
'file://'
+
INSTANCE_HOME
+
"/bt5/erp5_base"
local_bt
=
'file://'
+
INSTANCE_HOME
+
"/bt5/erp5_base"
...
@@ -799,11 +798,11 @@ class TestTemplateTool(ERP5TypeTestCase):
...
@@ -799,11 +798,11 @@ class TestTemplateTool(ERP5TypeTestCase):
copyTestCoreBt
(
"bt5"
)
copyTestCoreBt
(
"bt5"
)
# create bt1..5 BT inside dummy_repository
# create bt1..5 BT inside dummy_repository
repo_xml
=
getDOMImplementation
().
createDocument
(
None
,
"repository"
,
None
)
repo_xml
=
getDOMImplementation
().
createDocument
(
None
,
"repository"
,
None
)
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt1'
,
dependency_list
=
(
'bt4'
,))
,
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt1'
,
dependency_list
=
(
'bt4'
,))
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt2'
)
,
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt2'
)
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt3'
)
,
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt3'
)
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt4'
)
,
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt4'
)
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt5'
)
,
createBtAndAddToRepository
(
repository
,
repo_xml
,
title
=
'bt5'
)
with
open
(
"%s/bt5list"
%
repository
,
"wb"
)
as
repo_xml_fd
:
with
open
(
"%s/bt5list"
%
repository
,
"wb"
)
as
repo_xml_fd
:
repo_xml
.
writexml
(
repo_xml_fd
)
repo_xml
.
writexml
(
repo_xml_fd
)
repo_xml_fd
.
close
()
repo_xml_fd
.
close
()
...
...
bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.xml
0 → 100644
View file @
7153d667
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testTemplateTool
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.tests.testTemplateTool
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testTemplateTool
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_forge/bt/template_test_id_list
View file @
7153d667
test.erp5.testBug
test.erp5.testBug
test.erp5.testERP5Toolbox
test.erp5.testERP5Toolbox
test.erp5.testTemplateTool
\ No newline at end of file
bt5/erp5_forge/bt/test_dependency_list
View file @
7153d667
...
@@ -4,3 +4,5 @@ erp5_pdm
...
@@ -4,3 +4,5 @@ erp5_pdm
erp5_simulation
erp5_simulation
erp5_trade
erp5_trade
erp5_project
erp5_project
erp5_core_proxy_field_legacy
erp5_csv_style
\ No newline at end of file
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