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
Eteri
erp5
Commits
3bea10bb
Commit
3bea10bb
authored
Jul 21, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tinnies style changes.
parent
61b78ab1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
product/ERP5/tests/testTemplateTool.py
product/ERP5/tests/testTemplateTool.py
+16
-14
No files found.
product/ERP5/tests/testTemplateTool.py
View file @
3bea10bb
...
...
@@ -55,7 +55,8 @@ class TestTemplateTool(ERP5TypeTestCase):
def
afterSetUp
(
self
):
self
.
templates_tool
=
self
.
portal
.
portal_templates
self
.
templates_tool
.
updateRepositoryBusinessTemplateList
(
\
[
"http://www.erp5.org/dists/snapshot/bt5/"
,])
[
"http://www.erp5.org/dists/snapshot/bt5/"
,
])
def
beforeTearDown
(
self
):
uninstall_bt_list
=
[
"erp5_odt_style"
,
"erp5_pdm"
,
'erp5_accounting'
]
...
...
@@ -168,7 +169,7 @@ class TestTemplateTool(ERP5TypeTestCase):
template_tool
=
self
.
portal
.
portal_templates
url
=
'https://svn.erp5.org/repos/public/erp5/trunk/bt5/test_core'
# don't install test_file
keep_original_list
=
(
'portal_skins/erp5_test/test_file'
,
)
keep_original_list
=
(
'portal_skins/erp5_test/test_file'
,
)
template_tool
.
updateBusinessTemplateFromUrl
(
url
,
keep_original_list
=
keep_original_list
)
bt
=
template_tool
.
getInstalledBusinessTemplate
(
'test_core'
)
...
...
@@ -299,7 +300,7 @@ class TestTemplateTool(ERP5TypeTestCase):
def
test_getInstalledBusinessTemplateList
(
self
):
templates_tool
=
self
.
getPortal
().
portal_templates
bt5_list
=
templates_tool
.
getInstalledBusinessTemplateList
()
another_bt_list
=
[
i
for
i
in
templates_tool
.
contentValues
()
\
another_bt_list
=
[
i
for
i
in
templates_tool
.
contentValues
()
\
if
i
.
getInstallationState
()
==
'installed'
]
self
.
assertEquals
(
len
(
bt5_list
),
len
(
another_bt_list
))
for
bt
in
bt5_list
:
...
...
@@ -310,8 +311,8 @@ class TestTemplateTool(ERP5TypeTestCase):
def
test_getInstalledBusinessTemplateTitleList
(
self
):
templates_tool
=
self
.
getPortal
().
portal_templates
bt5_list
=
templates_tool
.
getInstalledBusinessTemplateTitleList
()
another_bt_list
=
[
i
.
getTitle
()
for
i
in
templates_tool
.
contentValues
()
\
bt5_list
=
templates_tool
.
getInstalledBusinessTemplateTitleList
()
another_bt_list
=
[
i
.
getTitle
()
for
i
in
templates_tool
.
contentValues
()
\
if
i
.
getInstallationState
()
==
'installed'
]
bt5_list
.
sort
()
another_bt_list
.
sort
()
...
...
@@ -328,11 +329,11 @@ class TestTemplateTool(ERP5TypeTestCase):
template
"""
# How to define an existing and use INSTANCE_HOME_REPOSITORY?
url_list
=
[
'https://svn.erp5.org/repos/public/erp5/trunk/bt5'
,
'http://www.erp5.org/dists/snapshot/bt5'
,
'http://www.erp5.org/dists/release/5.4.5/bt5'
,
"INSTANCE_HOME_REPOSITORY"
,
'file:///opt/does/not/exist'
]
url_list
=
[
'https://svn.erp5.org/repos/public/erp5/trunk/bt5'
,
'http://www.erp5.org/dists/snapshot/bt5'
,
'http://www.erp5.org/dists/release/5.4.5/bt5'
,
"INSTANCE_HOME_REPOSITORY"
,
'file:///opt/does/not/exist'
]
exist_bt5
=
'erp5_base'
not_exist_bt5
=
"erp5_not_exist"
...
...
@@ -368,7 +369,7 @@ class TestTemplateTool(ERP5TypeTestCase):
template_tool
=
self
.
portal
.
portal_templates
bt5_id_list
=
[
'erp5_accounting'
]
bt5_list
=
template_tool
.
resolveBusinessTemplateListDependency
(
bt5_id_list
)
self
.
assertEquals
([(
repository
,
'erp5_simulation.bt5'
),
self
.
assertEquals
([(
repository
,
'erp5_simulation.bt5'
),
(
repository
,
'erp5_accounting.bt5'
)],
bt5_list
)
bt5_id_list
=
[
'erp5_csv_style'
]
...
...
@@ -387,11 +388,12 @@ class TestTemplateTool(ERP5TypeTestCase):
bt5_id_list
=
[
'erp5_configurator_ung'
]
bt5_list
=
template_tool
.
resolveBusinessTemplateListDependency
(
bt5_id_list
)
self
.
assertEquals
([(
repository
,
'erp5_workflow.bt5'
),
(
repository
,
'erp5_configurator.bt5'
),
(
repository
,
'erp5_configurator.bt5'
),
(
repository
,
'erp5_configurator_ung.bt5'
)],
bt5_list
)
bt5_id_list
=
[
'erp5_configurator_ung'
,
'erp5_accounting'
,
'erp5_invoicing'
,
'erp5_crm'
]
bt5_id_list
=
[
'erp5_configurator_ung'
,
'erp5_accounting'
,
'erp5_invoicing'
,
'erp5_crm'
]
bt5_list
=
template_tool
.
resolveBusinessTemplateListDependency
(
bt5_id_list
)
self
.
assertEquals
([(
repository
,
'erp5_ingestion_mysql_innodb_catalog.bt5'
),
(
repository
,
'erp5_workflow.bt5'
),
...
...
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