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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
695a5d7c
Commit
695a5d7c
authored
Sep 29, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: fixup RegularisationRequest_checkToTriggerNextEscalationStep tests
parent
a3e33f96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMRegularisationRequestSkins.py
...ents/test.erp5.testSlapOSCRMRegularisationRequestSkins.py
+17
-17
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMRegularisationRequestSkins.py
View file @
695a5d7c
...
...
@@ -237,18 +237,16 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
0
,
ticket
.
getRelativeUrl
(),
''
,
''
,
''
,
''
)
@
simulate
(
'NotificationTool_getDocumentValue'
,
'reference=None, language="en"'
,
'assert reference == "slapos-crm.acknowledgment.escalation", reference
\
n
'
\
'return'
)
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'service_relative_url, title, text_content, comment, REQUEST=None'
,
'service_relative_url, title, text_content, comment, '
\
'notification_message=None, substitution_method_parameter_dict=None, '
\
'REQUEST=None'
,
'context.portal_workflow.doActionFor('
\
'context, action="edit_action", '
\
'comment="Visited by RegularisationRequest_checkToSendUniqEvent '
\
'%s %s %s %s
" % (service_relative_url, title, text_content, commen
t))
\
n
'
\
'%s %s %s %s
%s %s" % (service_relative_url, title, text_content, comment, notification_message, substitution_method_parameter_dic
t))
\
n
'
\
'return "fooevent"'
)
def
test_checkToTriggerNextEscalationStep_matching
_e
vent
(
self
):
def
test_checkToTriggerNextEscalationStep_matching
E
vent
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -265,19 +263,21 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
event2
=
ticket
.
RegularisationRequest_checkToTriggerNextEscalationStep
(
7
,
'service_module/slapos_crm_acknowledgement'
,
'service_module/slapos_crm_spam'
,
'foo2 title'
,
'foo2 content'
,
'foo2 comment'
)
'foo2 title'
,
'foo2 content'
,
'foo2 comment'
,
notification_message
=
'slapos-crm.acknowledgment.escalation'
,
substitution_method_parameter_dict
=
{
'foo'
:
'bar'
})
self
.
assertEqual
(
event2
,
event
.
getRelativeUrl
())
self
.
assertEqual
(
'Visited by RegularisationRequest_checkToSendUniqEvent %s %s %s %s'
%
\
'Visited by RegularisationRequest_checkToSendUniqEvent %s %s %s %s
%s %s
'
%
\
(
'service_module/slapos_crm_spam'
,
'foo2 title'
,
'foo2 content'
,
'foo2 comment'
),
'foo2 comment'
,
'slapos-crm.acknowledgment.escalation'
,
{
'foo'
:
'bar'
}
),
ticket
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'*args, **kwargs'
,
'raise NotImplementedError, "Should not have been called"'
)
def
test_checkToTriggerNextEscalationStep_recent
_e
vent
(
self
):
def
test_checkToTriggerNextEscalationStep_recent
E
vent
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -301,7 +301,7 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'*args, **kwargs'
,
'raise NotImplementedError, "Should not have been called"'
)
def
test_checkToTriggerNextEscalationStep_other_ticket
_e
vent
(
self
):
def
test_checkToTriggerNextEscalationStep_other_ticket
E
vent
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -324,7 +324,7 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'*args, **kwargs'
,
'raise NotImplementedError, "Should not have been called"'
)
def
test_checkToTriggerNextEscalationStep_other
_resource_e
vent
(
self
):
def
test_checkToTriggerNextEscalationStep_other
ResourceE
vent
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -348,7 +348,7 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'*args, **kwargs'
,
'raise NotImplementedError, "Should not have been called"'
)
def
test_checkToTriggerNextEscalationStep_no
_current_e
vent
(
self
):
def
test_checkToTriggerNextEscalationStep_no
CurrentE
vent
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -365,7 +365,7 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'*args, **kwargs'
,
'raise NotImplementedError, "Should not have been called"'
)
def
test_checkToTriggerNextEscalationStep_no
_ticket_r
esource
(
self
):
def
test_checkToTriggerNextEscalationStep_no
TicketR
esource
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
validate
()
ticket
.
suspend
()
...
...
@@ -388,7 +388,7 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
@
simulate
(
'RegularisationRequest_checkToSendUniqEvent'
,
'*args, **kwargs'
,
'raise NotImplementedError, "Should not have been called"'
)
def
test_checkToTriggerNextEscalationStep_not
_s
uspended
(
self
):
def
test_checkToTriggerNextEscalationStep_not
S
uspended
(
self
):
ticket
=
self
.
createRegularisationRequest
()
ticket
.
edit
(
resource
=
'service_module/slapos_crm_acknowledgement'
)
ticket
.
validate
()
...
...
@@ -408,7 +408,7 @@ class TestSlapOSRegularisationRequest_checkToTriggerNextEscalationStep(
self
.
assertEqual
(
event2
,
None
)
def
test_checkToTriggerNextEscalationStep_REQUEST
_
disallowed
(
self
):
def
test_checkToTriggerNextEscalationStep_REQUESTdisallowed
(
self
):
ticket
=
self
.
createRegularisationRequest
()
self
.
assertRaises
(
Unauthorized
,
...
...
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