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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
bd4001bb
Commit
bd4001bb
authored
Oct 13, 2016
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: fix SupportRequest_updateMonitoringHostingSubscriptionState and add test.
parent
cb2515a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_updateMonitoringHostingSubscriptionState.py
...upportRequest_updateMonitoringHostingSubscriptionState.py
+4
-5
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+12
-3
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm_monitoring/SupportRequest_updateMonitoringHostingSubscriptionState.py
View file @
bd4001bb
...
...
@@ -4,7 +4,7 @@ import json
from
Products.ERP5Type.DateUtils
import
addToDate
portal
=
context
.
getPortalObject
()
document
=
context
.
get
SourceProject
Value
()
document
=
context
.
get
Aggregate
Value
()
if
document
is
None
:
return
...
...
@@ -37,8 +37,7 @@ if not has_error:
return
# Send Notification message
message
=
""" Suspending this ticket as the problem is not present anymore.
"""
message
=
""" Suspending this ticket as the problem is not present anymore. """
notification_reference
=
"slapos-crm-support-request-suspend-hs-notification"
notification_message
=
portal
.
portal_notifications
.
getDocumentValue
(
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
bd4001bb
...
...
@@ -8,7 +8,6 @@ from functools import wraps
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
import
difflib
import
json
from
unittest
import
skip
def
simulate
(
script_id
,
params_string
,
code_string
):
def
upperWrap
(
f
):
...
...
@@ -3634,7 +3633,6 @@ class TestSupportRequestUpdateMonitoringState(testSlapOSMixin):
support_request
.
SupportRequest_updateMonitoringComputerState
())
self
.
assertEquals
(
support_request
.
getSimulationState
(),
"suspended"
)
@
skip
(
"Missing to finish"
)
@
simulate
(
'SupportRequest_trySendNotificationMessage'
,
"message_title, message, source_relative_url"
,
'return "Visited by SupportRequest_trySendNotificationMessage '
\
...
...
@@ -3652,8 +3650,18 @@ class TestSupportRequestUpdateMonitoringState(testSlapOSMixin):
support_request
.
SupportRequest_updateMonitoringHostingSubscriptionState
())
support_request
.
setAggregateValue
(
self
.
_makeHostingSubscription
())
self
.
assertEquals
(
None
,
support_request
.
SupportRequest_updateMonitoringHostingSubscriptionState
())
support_request
.
setDestinationDecisionValue
(
self
.
_makePerson
())
raise
NotImplementedError
(
"Not implemented yet"
)
self
.
assertEquals
(
"Visited by SupportRequest_trySendNotificationMessage Suspending this ticket as the problem is not present anymore Suspending this ticket as the problem is not present anymore. %s"
%
\
support_request
.
getDestinationDecision
(),
support_request
.
SupportRequest_updateMonitoringHostingSubscriptionState
())
self
.
assertEquals
(
"suspended"
,
support_request
.
getSimulationState
())
@
simulate
(
'SupportRequest_trySendNotificationMessage'
,
"message_title, message, source_relative_url"
,
...
...
@@ -3686,3 +3694,4 @@ class TestSupportRequestUpdateMonitoringState(testSlapOSMixin):
self
.
assertEquals
(
"invalidated"
,
support_request
.
getSimulationState
())
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