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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
e664d487
Commit
e664d487
authored
Jul 28, 2020
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test/upgradeOldDataFS] use UI callables
Ensure the admin will able to trigger the upgrader
parent
475fe404
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
2 deletions
+37
-2
product/ERP5Type/tests/testUpgradeInstanceWithOldDataFs.py
product/ERP5Type/tests/testUpgradeInstanceWithOldDataFs.py
+37
-2
No files found.
product/ERP5Type/tests/testUpgradeInstanceWithOldDataFs.py
View file @
e664d487
...
...
@@ -26,8 +26,13 @@
#
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
import
StringIO
import
urllib
import
httplib
class
TestUpgradeInstanceWithOldDataFs
(
ERP5TypeTestCase
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_full_text_mroonga_catalog'
,
...
...
@@ -72,9 +77,39 @@ class TestUpgradeInstanceWithOldDataFs(ERP5TypeTestCase):
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
promise_check_upgrade
alarm
.
solve
()
# Ensure it is viewable
alarm
.
view
()
# Call active sense
alarm
.
activeSense
()
self
.
tic
()
# XXX No idea why active sense must be called twice...
alarm
.
activeSense
()
self
.
tic
()
self
.
assertNotEquals
([
x
.
detail
for
x
in
alarm
.
getLastActiveProcess
().
getResultList
()],
[])
# Solve divergencies, like called from the form_dialog
ret
=
self
.
publish
(
'%s/portal_alarms/promise_check_upgrade'
%
self
.
portal
.
getPath
(),
basic
=
'%s:current'
%
self
.
id
(),
stdin
=
StringIO
.
StringIO
(
urllib
.
urlencode
({
'Base_callDialogMethod:method'
:
''
,
'dialog_id'
:
'Alarm_viewSolveDialog'
,
'dialog_method'
:
'Alarm_solve'
,
'form_id'
:
'Alarm_view'
,
'selection_name'
:
'foo_selection'
,
})),
request_method
=
"POST"
,
handle_errors
=
False
)
self
.
assertEqual
(
httplib
.
FOUND
,
ret
.
getStatus
())
alarm
.
Alarm_solve
()
self
.
tic
()
self
.
assertEquals
(
alarm
.
getLastActiveProcess
().
getResultList
(),
[])
self
.
assertEquals
([
x
.
detail
for
x
in
alarm
.
getLastActiveProcess
().
getResultList
()],
[])
# Make sure that *all* Portal Type can be loaded after upgrade
import
erp5.portal_type
...
...
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