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
3fb08c40
Commit
3fb08c40
authored
Aug 03, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm/testSlapOSCRMSkins: Use _dropScript API from mixin instead repeat implementation
parent
6d36e12b
Pipeline
#10802
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+2
-9
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
3fb08c40
...
@@ -1219,13 +1219,6 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
...
@@ -1219,13 +1219,6 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
"""return context.getPortalObject().REQUEST['_simulateBase_generateSupportRequestForSlapOS']"""
)
"""return context.getPortalObject().REQUEST['_simulateBase_generateSupportRequestForSlapOS']"""
)
transaction
.
commit
()
transaction
.
commit
()
def
_dropBase_generateSupportRequestForSlapOS
(
self
):
script_name
=
'Base_generateSupportRequestForSlapOS'
if
script_name
in
self
.
portal
.
portal_skins
.
custom
.
objectIds
():
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
transaction
.
commit
()
self
.
assertFalse
(
script_name
in
self
.
portal
.
portal_skins
.
custom
.
objectIds
())
@
simulate
(
'ERP5Site_isSupportRequestCreationClosed'
,
'*args, **kwargs'
,
'return 0'
)
@
simulate
(
'ERP5Site_isSupportRequestCreationClosed'
,
'*args, **kwargs'
,
'return 0'
)
def
test_Computer_checkState_call_support_request
(
self
):
def
test_Computer_checkState_call_support_request
(
self
):
computer
=
self
.
_makeComputer
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
computer
=
self
.
_makeComputer
(
owner
=
self
.
makePerson
(
user
=
0
))[
0
]
...
@@ -1245,7 +1238,7 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
...
@@ -1245,7 +1238,7 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
try
:
try
:
computer_support_request
=
computer
.
Computer_checkState
()
computer_support_request
=
computer
.
Computer_checkState
()
finally
:
finally
:
self
.
_drop
Base_generateSupportRequestForSlapOS
(
)
self
.
_drop
Script
(
"Base_generateSupportRequestForSlapOS"
)
self
.
assertEqual
(
support_request
,
self
.
assertEqual
(
support_request
,
computer_support_request
)
computer_support_request
)
...
@@ -1263,7 +1256,7 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
...
@@ -1263,7 +1256,7 @@ class TestSlapOSComputer_CheckState(TestCRMSkinsMixin):
try
:
try
:
computer_support_request
=
computer
.
Computer_checkState
()
computer_support_request
=
computer
.
Computer_checkState
()
finally
:
finally
:
self
.
_drop
Base_generateSupportRequestForSlapOS
(
)
self
.
_drop
Script
(
"Base_generateSupportRequestForSlapOS"
)
self
.
assertEqual
(
support_request
,
self
.
assertEqual
(
support_request
,
computer_support_request
)
computer_support_request
)
...
...
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