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
18
Merge Requests
18
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
nexedi
slapos.core
Commits
3e25c3f6
Commit
3e25c3f6
authored
Jul 28, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Jul 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add unit test for ERP5Site_isSupportRequestCreationClosed with suspended state
parent
8d73cc9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSupportRequestGeneration.py
...TestTemplateItem/testSlapOSCRMSupportRequestGeneration.py
+24
-6
master/bt5/slapos_crm/bt/revision
master/bt5/slapos_crm/bt/revision
+1
-1
No files found.
master/bt5/slapos_crm/TestTemplateItem/testSlapOSCRMSupportRequestGeneration.py
View file @
3e25c3f6
...
...
@@ -44,12 +44,7 @@ class TestSlapOSCloudSupportRequestGeneration(testSlapOSMixin):
for
support_request
in
self
.
portal
.
portal_catalog
(
portal_type
=
"Support Request"
,
title
=
"Test Support Request %"
,
simulation_state
=
"validated"
):
support_request
.
invalidate
()
for
support_request
in
self
.
portal
.
portal_catalog
(
portal_type
=
"Support Request"
,
title
=
"Allocation scope has been changed for TESTCOMPT%"
,
simulation_state
=
"suspended"
):
simulation_state
=
[
"validated"
,
"suspended"
]):
support_request
.
invalidate
()
self
.
tic
()
...
...
@@ -234,6 +229,29 @@ class TestSlapOSCloudSupportRequestGeneration(testSlapOSMixin):
self
.
assertFalse
(
self
.
portal
.
ERP5Site_isSupportRequestCreationClosed
(
other_person
.
getRelativeUrl
()))
def
test_ERP5Site_isSupportRequestCreationClosed_submitted_state
(
self
):
person
=
self
.
_makePerson
(
self
.
new_id
)
url
=
person
.
getRelativeUrl
()
self
.
assertFalse
(
self
.
portal
.
ERP5Site_isSupportRequestCreationClosed
(
url
))
self
.
assertFalse
(
self
.
portal
.
ERP5Site_isSupportRequestCreationClosed
())
def
newSupportRequest
():
sr
=
self
.
portal
.
support_request_module
.
newContent
(
\
title
=
"Test Support Request POIUY"
,
destination_decision
=
url
)
sr
.
validate
()
sr
.
suspend
()
sr
.
immediateReindexObject
()
# Create five tickets, the limit of ticket creation
newSupportRequest
()
newSupportRequest
()
newSupportRequest
()
newSupportRequest
()
newSupportRequest
()
self
.
assertFalse
(
self
.
portal
.
ERP5Site_isSupportRequestCreationClosed
(
url
))
self
.
assertFalse
(
self
.
portal
.
ERP5Site_isSupportRequestCreationClosed
())
def
test_Base_generateSupportRequestForSlapOS_recreate_if_closed
(
self
):
title
=
"Test Support Request %s"
%
self
.
new_id
...
...
master/bt5/slapos_crm/bt/revision
View file @
3e25c3f6
37
\ No newline at end of file
38
\ No newline at end of file
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