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
fb5ed64f
Commit
fb5ed64f
authored
Sep 25, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: Base_getOpenRelatedTicketList was dropped
parent
0be2d504
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
175 deletions
+0
-175
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
...ateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
+0
-175
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMSkins.py
View file @
fb5ed64f
...
...
@@ -454,181 +454,6 @@ class TestSlapOSComputeNode_getTicketRelatedList(TestCRMSkinsMixin):
open_related_ticket_list
=
document
.
ComputeNode_getTicketRelatedList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
class
TestSlapOSBase_getOpenRelatedTicketList
(
TestCRMSkinsMixin
):
def
test_getOpenRelatedTicketList_support_request_related_to_compute_node
(
self
):
self
.
_test_getOpenRelatedTicketList_support_request_related
(
self
.
_makeComputeNode
(
self
.
project
)[
0
])
def
test_getOpenRelatedTicketList_support_request_related_to_instance_tree
(
self
):
self
.
_test_getOpenRelatedTicketList_support_request_related
(
self
.
_makeInstanceTree
())
def
_test_getOpenRelatedTicketList_support_request_related
(
self
,
document
):
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
\
title
=
"Test Support Request %s"
%
self
.
new_id
)
ticket
.
setAggregateValue
(
document
)
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
# Not indexed yet
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
self
.
tic
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
ticket
.
submit
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
validate
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
suspend
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
invalidate
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
def
test_getOpenRelatedTicketList_cancelled_support_request_related_to_compute_node
(
self
):
self
.
_test_getOpenRelatedTicketList_cancelled_support_request_related
(
self
.
_makeComputeNode
(
self
.
project
)[
0
])
def
test_getOpenRelatedTicketList_cancelled_support_request_related_to_instance_tree
(
self
):
self
.
_test_getOpenRelatedTicketList_cancelled_support_request_related
(
self
.
_makeInstanceTree
())
def
_test_getOpenRelatedTicketList_cancelled_support_request_related
(
self
,
document
):
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
\
title
=
"Test Support Request %s"
%
self
.
new_id
)
ticket
.
setAggregateValue
(
document
)
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
# Not indexed yet
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
self
.
tic
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
ticket
.
submit
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
cancel
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
def
test_getOpenRelatedTicketList_upgrade_decision_related_to_compute_node
(
self
):
self
.
_test_getOpenRelatedTicketList_upgrade_decision_related
(
self
.
_makeComputeNode
(
self
.
project
)[
0
])
def
test_getOpenRelatedTicketList_upgrade_decision_related_to_instance_tree
(
self
):
self
.
_test_getOpenRelatedTicketList_upgrade_decision_related
(
self
.
_makeInstanceTree
())
def
_test_getOpenRelatedTicketList_upgrade_decision_related
(
self
,
document
):
def
newUpgradeDecision
():
ticket
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
'Upgrade Decision'
,
title
=
"Upgrade Decision Test %s"
%
self
.
new_id
,
reference
=
"TESTUD-%s"
%
self
.
new_id
)
ticket
.
immediateReindexObject
()
return
ticket
ticket
=
newUpgradeDecision
()
ticket
.
newContent
(
portal_type
=
"Upgrade Decision Line"
).
setAggregateValue
(
document
)
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
# Not indexed yet
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
self
.
tic
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
ticket
.
plan
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
ticket
.
confirm
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
start
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
stop
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
ticket
.
deliver
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
1
)
self
.
assertEqual
(
open_related_ticket_list
[
0
].
getUid
(),
ticket
.
getUid
())
def
test_getOpenRelatedTicketList_cancelled_upgrade_decision_related_to_compute_node
(
self
):
self
.
_test_getOpenRelatedTicketList_cancelled_upgrade_decision_related
(
self
.
_makeComputeNode
(
self
.
project
)[
0
])
def
test_getOpenRelatedTicketList_cancelled_upgrade_decision_related_to_instance_tree
(
self
):
self
.
_test_getOpenRelatedTicketList_cancelled_upgrade_decision_related
(
self
.
_makeInstanceTree
())
def
_test_getOpenRelatedTicketList_cancelled_upgrade_decision_related
(
self
,
document
):
def
newUpgradeDecision
():
ticket
=
self
.
portal
.
upgrade_decision_module
.
newContent
(
portal_type
=
'Upgrade Decision'
,
title
=
"Upgrade Decision Test %s"
%
self
.
new_id
,
reference
=
"TESTUD-%s"
%
self
.
new_id
)
ticket
.
immediateReindexObject
()
return
ticket
ticket
=
newUpgradeDecision
()
ticket
.
newContent
(
portal_type
=
"Upgrade Decision Line"
).
setAggregateValue
(
document
)
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
# Not indexed yet
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
self
.
tic
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
ticket
.
cancel
()
ticket
.
immediateReindexObject
()
open_related_ticket_list
=
document
.
Base_getOpenRelatedTicketList
()
self
.
assertEqual
(
len
(
open_related_ticket_list
),
0
)
class
TestSlapOSComputeNode_notifyWrongAllocationScope
(
TestCRMSkinsMixin
):
...
...
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