Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
9f43c3e1
Commit
9f43c3e1
authored
Jan 31, 2023
by
Romain Courteaud
🐸
Committed by
Rafael Monnerat
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: stop using _simulateScript
parent
06849930
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
+8
-20
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
...teItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
+8
-20
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
9f43c3e1
...
@@ -666,35 +666,23 @@ return %s""" % (script_name, fake_return ))
...
@@ -666,35 +666,23 @@ return %s""" % (script_name, fake_return ))
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
transaction
.
commit
()
transaction
.
commit
()
def
assertScriptVisited
(
self
,
document
,
script_name
):
self
.
assertEqual
(
'Visited by %s'
%
script_name
,
document
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
assertScriptNotVisited
(
self
,
document
,
script_name
):
self
.
assertNotEqual
(
'Visited by %s'
%
script_name
,
document
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
_test_alarm
(
self
,
alarm
,
document
,
script_name
):
def
_test_alarm
(
self
,
alarm
,
document
,
script_name
):
self
.
tic
()
self
.
tic
()
self
.
_simulateScript
(
script_name
)
with
TemporaryAlarmScript
(
self
.
portal
,
script_name
):
try
:
alarm
.
activeSense
()
alarm
.
activeSense
()
self
.
tic
()
self
.
tic
()
finally
:
self
.
assertEqual
(
self
.
_dropScript
(
script_name
)
'Visited by %s'
%
script_name
,
self
.
assertScriptVisited
(
document
,
script_name
)
document
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
]
)
def
_test_alarm_not_visited
(
self
,
alarm
,
document
,
script_name
):
def
_test_alarm_not_visited
(
self
,
alarm
,
document
,
script_name
):
self
.
tic
()
self
.
tic
()
self
.
_simulateScript
(
script_name
)
with
TemporaryAlarmScript
(
self
.
portal
,
script_name
):
try
:
alarm
.
activeSense
()
alarm
.
activeSense
()
self
.
tic
()
self
.
tic
()
finally
:
self
.
assertNotEqual
(
self
.
_dropScript
(
script_name
)
'Visited by %s'
%
script_name
,
self
.
assertScriptNotVisited
(
document
,
script_name
)
document
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
]
)
def
restoreAccountingTemplatesOnPreferences
(
self
):
def
restoreAccountingTemplatesOnPreferences
(
self
):
self
.
login
()
self
.
login
()
...
...
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