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
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
Titouan Soulard
slapos.core
Commits
eeacf205
Commit
eeacf205
authored
Sep 11, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: update tests
parent
11c94d96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
15 deletions
+29
-15
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_triggerEscalationOnAcknowledgmentRegularisationRequest.py
...triggerEscalationOnAcknowledgmentRegularisationRequest.py
+2
-2
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_triggerEscalationOnStopReminderRegularisationRequest.py
...m_triggerEscalationOnStopReminderRegularisationRequest.py
+2
-2
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
+25
-11
No files found.
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_triggerEscalationOnAcknowledgmentRegularisationRequest.py
View file @
eeacf205
portal
=
context
.
getPortalObject
()
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
"Regularisation Request"
,
portal_type
=
"Regularisation Request"
,
simulation_state
=
[
"suspended"
],
default_resource
_uid
=
portal
.
service_module
.
slapos_crm_acknowledgement
.
getUid
(),
resource_
_uid
=
portal
.
service_module
.
slapos_crm_acknowledgement
.
getUid
(),
method_id
=
'RegularisationRequest_triggerAcknowledgmentEscalation'
,
activate_kw
=
{
'tag'
:
tag
}
)
...
...
master/bt5/slapos_crm/SkinTemplateItem/portal_skins/slapos_crm/Alarm_triggerEscalationOnStopReminderRegularisationRequest.py
View file @
eeacf205
portal
=
context
.
getPortalObject
()
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
"Regularisation Request"
,
portal_type
=
"Regularisation Request"
,
simulation_state
=
[
"suspended"
],
default_resource
_uid
=
portal
.
service_module
.
slapos_crm_stop_reminder
.
getUid
(),
resource_
_uid
=
portal
.
service_module
.
slapos_crm_stop_reminder
.
getUid
(),
method_id
=
'RegularisationRequest_triggerStopReminderEscalation'
,
activate_kw
=
{
'tag'
:
tag
}
)
...
...
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
View file @
eeacf205
...
...
@@ -212,7 +212,10 @@ class TestSlapOSCrmTriggerEscalationOnAcknowledgmentRegularisationRequest(SlapOS
reference
=
"TESTREGREQ-%s"
%
new_id
,
)
def
test_triggerAcknowledgmentEscalation_matching_regularisation_request
(
self
):
#################################################################
# slapos_crm_trigger_acknowledgment_escalation
#################################################################
def
test_RegularisationRequest_triggerAcknowledgmentEscalation_alarm_matchingRegularisationRequest
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -224,7 +227,7 @@ class TestSlapOSCrmTriggerEscalationOnAcknowledgmentRegularisationRequest(SlapOS
self
.
_test_alarm
(
alarm
,
ticket
,
"RegularisationRequest_triggerAcknowledgmentEscalation"
)
def
test_
triggerAcknowledgmentEscalation_not_suspended
(
self
):
def
test_
RegularisationRequest_triggerAcknowledgmentEscalation_alarm_notSuspendedRegularisationRequest
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -236,7 +239,7 @@ class TestSlapOSCrmTriggerEscalationOnAcknowledgmentRegularisationRequest(SlapOS
"RegularisationRequest_triggerAcknowledgmentEscalation"
)
def
test_
triggerAcknowledgmentEscalation_not_expected_r
esource
(
self
):
def
test_
RegularisationRequest_triggerAcknowledgmentEscalation_alarm__notExpectedR
esource
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
validate
()
ticket
.
suspend
()
...
...
@@ -247,6 +250,7 @@ class TestSlapOSCrmTriggerEscalationOnAcknowledgmentRegularisationRequest(SlapOS
self
.
_test_alarm_not_visited
(
alarm
,
ticket
,
"RegularisationRequest_triggerAcknowledgmentEscalation"
)
class
TestSlapOSCrmTriggerEscalationOnStopReminderRegularisationRequest
(
SlapOSTestCaseMixinWithAbort
):
def
createRegularisationRequest
(
self
):
...
...
@@ -257,7 +261,10 @@ class TestSlapOSCrmTriggerEscalationOnStopReminderRegularisationRequest(SlapOSTe
reference
=
"TESTREGREQ-%s"
%
new_id
,
)
def
test_triggerStopReminderEscalation_matching_regularisation_request
(
self
):
#################################################################
# slapos_crm_trigger_stop_reminder_escalation
#################################################################
def
test_RegularisationRequest_triggerStopReminderEscalation_alarm_matchingRegularisationRequest
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_stop_reminder'
)
ticket
.
validate
()
...
...
@@ -269,7 +276,7 @@ class TestSlapOSCrmTriggerEscalationOnStopReminderRegularisationRequest(SlapOSTe
self
.
_test_alarm
(
alarm
,
ticket
,
"RegularisationRequest_triggerStopReminderEscalation"
)
def
test_
triggerStopReminderEscalation_not_s
uspended
(
self
):
def
test_
RegularisationRequest_triggerStopReminderEscalation_alarm_notS
uspended
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_stop_reminder'
)
ticket
.
validate
()
...
...
@@ -280,7 +287,7 @@ class TestSlapOSCrmTriggerEscalationOnStopReminderRegularisationRequest(SlapOSTe
self
.
_test_alarm_not_visited
(
alarm
,
ticket
,
"RegularisationRequest_triggerStopReminderEscalation"
)
def
test_
triggerStopReminderEscalation_not_expected_r
esource
(
self
):
def
test_
RegularisationRequest_triggerStopReminderEscalation_alarm_notExpectedR
esource
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
validate
()
ticket
.
suspend
()
...
...
@@ -291,6 +298,7 @@ class TestSlapOSCrmTriggerEscalationOnStopReminderRegularisationRequest(SlapOSTe
self
.
_test_alarm_not_visited
(
alarm
,
ticket
,
"RegularisationRequest_triggerStopReminderEscalation"
)
class
TestSlapOSCrmTriggerEscalationOnStopAcknowledgmentRegularisationRequest
(
SlapOSTestCaseMixinWithAbort
):
def
createRegularisationRequest
(
self
):
...
...
@@ -301,6 +309,9 @@ class TestSlapOSCrmTriggerEscalationOnStopAcknowledgmentRegularisationRequest(Sl
reference
=
"TESTREGREQ-%s"
%
new_id
,
)
#################################################################
# slapos_crm_trigger_stop_acknowledgment_escalation
#################################################################
def
test_triggerStopAcknowledgmentEscalation_matching_regularisation_request
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_stop_acknowledgement'
)
...
...
@@ -345,7 +356,10 @@ class TestSlapOSCrmTriggerEscalationOnDeleteReminderRegularisationRequest(SlapOS
reference
=
"TESTREGREQ-%s"
%
new_id
,
)
def
test_triggerDeleteReminderEscalation_matching_regularisation_request
(
self
):
#################################################################
# slapos_crm_trigger_delete_reminder_escalation
#################################################################
def
test_RegularisationRequest_triggerDeleteReminderEscalation_alarm_matchingRegularisationRequest
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_delete_reminder'
)
ticket
.
validate
()
...
...
@@ -356,18 +370,17 @@ class TestSlapOSCrmTriggerEscalationOnDeleteReminderRegularisationRequest(SlapOS
slapos_crm_trigger_delete_reminder_escalation
self
.
_test_alarm
(
alarm
,
ticket
,
"RegularisationRequest_triggerDeleteReminderEscalation"
)
def
test_
triggerDeleteReminderEscalation_not_s
uspended
(
self
):
def
test_
RegularisationRequest_triggerDeleteReminderEscalation_alarm_notS
uspended
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_delete_reminder'
)
ticket
.
validate
()
self
.
tic
()
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_trigger_delete_reminder_escalation
self
.
_test_alarm_not_visited
(
alarm
,
ticket
,
"RegularisationRequest_triggerDeleteReminderEscalation"
)
def
test_triggerDeleteReminderEscalation_not_expected_resource
(
self
):
def
test_RegularisationRequest_triggerDeleteReminderEscalation_alarm_notExpectedResource
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
validate
()
ticket
.
suspend
()
...
...
@@ -377,6 +390,7 @@ class TestSlapOSCrmTriggerEscalationOnDeleteReminderRegularisationRequest(SlapOS
slapos_crm_trigger_delete_reminder_escalation
self
.
_test_alarm_not_visited
(
alarm
,
ticket
,
"RegularisationRequest_triggerDeleteReminderEscalation"
)
class
TestSlapOSCrmStopInstanceTree
(
SlapOSTestCaseMixinWithAbort
):
def
createRegularisationRequest
(
self
):
...
...
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