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
Yusei Tahara
erp5
Commits
5b2748f6
Commit
5b2748f6
authored
Jan 09, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_prototype: Update test for adding same document via different packages
parent
9203e6da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.py
...teItem/portal_components/test.erp5.testBusinessPackage.py
+13
-6
No files found.
bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.py
View file @
5b2748f6
...
...
@@ -179,10 +179,8 @@ class TestBusinessPackage(ERP5TypeTestCase):
# Get installation data from the list of packages which we want to install
package_list
=
[
old_package
,
new_package
]
data
=
createInstallationData
(
package_list
)
# creat InstallationTree object
installation_tree
=
InstallationTree
(
data
)
final_data
,
conflicted_data
=
createInstallationData
(
package_list
)
# Delete document from site
self
.
portal
.
document_module
.
manage_delObjects
([
document_file
.
getId
(),])
...
...
@@ -191,6 +189,15 @@ class TestBusinessPackage(ERP5TypeTestCase):
# Test if the file doesn't exist on site anymore
self
.
assertRaises
(
KeyError
,
lambda
:
self
.
portal
.
restrictedTraverse
(
file_path
))
# We try to install pakcages via mapping the installation tree to ZODB
# As both have exactly same document we expect that only one of them get installed
installation_tree
.
mapToERP5Site
()
if
not
conflicted_data
:
# Create InstallationTree object
installation_tree
=
InstallationTree
(
final_data
)
# We try to install pakcages via mapping the installation tree to ZODB
# As both have exactly same document we expect that only one of them get installed
installation_tree
.
mapToERP5Site
(
self
.
portal
)
# Test if the file is back
self
.
assertIsNotNone
(
self
.
portal
.
restrictedTraverse
(
file_path
))
document
=
self
.
portal
.
restrictedTraverse
(
file_path
)
self
.
assertEquals
(
document
.
title
,
document_file
.
title
)
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