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
05c2a4ec
Commit
05c2a4ec
authored
Jun 03, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test: reuse existing script
parent
ed4ffd36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
35 deletions
+9
-35
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5SubscriptionChangeRequestScenario.py
...t.erp5.testSlapOSERP5SubscriptionChangeRequestScenario.py
+9
-35
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5SubscriptionChangeRequestScenario.py
View file @
05c2a4ec
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
##############################################################################
##############################################################################
from
erp5.component.test.testSlapOSERP5VirtualMasterScenario
import
TestSlapOSVirtualMasterScenarioMixin
from
erp5.component.test.testSlapOSERP5VirtualMasterScenario
import
TestSlapOSVirtualMasterScenarioMixin
from
DateTime
import
DateTime
class
TestSlapOSSubscriptionChangeRequestScenarioMixin
(
TestSlapOSVirtualMasterScenarioMixin
):
class
TestSlapOSSubscriptionChangeRequestScenarioMixin
(
TestSlapOSVirtualMasterScenarioMixin
):
...
@@ -158,41 +157,16 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
...
@@ -158,41 +157,16 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
open_sale_order_line
=
open_sale_order_cell
.
getParentValue
()
open_sale_order_line
=
open_sale_order_cell
.
getParentValue
()
open_sale_order
=
open_sale_order_line
.
getParentValue
()
open_sale_order
=
open_sale_order_line
.
getParentValue
()
now
=
DateTime
()
subscription_change_request
=
open_sale_order_cell
.
getResourceValue
().
Resource_createSubscriptionRequest
(
subscription_change_request
=
self
.
portal
.
subscription_change_request_module
.
newContent
(
public_person2
,
portal_type
=
'Subscription Change Request'
,
# [software_type, software_release],
causality_value
=
open_sale_order
,
open_sale_order_cell
.
getVariationCategoryList
(),
open_sale_order
.
getSourceProjectValue
(),
destination_value
=
public_person2
,
currency_value
=
open_sale_order
.
getPriceCurrencyValue
(),
destination_section_value
=
public_person2
,
portal_type
=
'Subscription Change Request'
destination_decision_value
=
public_person2
,
destination_project
=
open_sale_order
.
getDestinationProject
(),
# XXX XXX should be calculated, and not copied
# to ensure the expected value is fetched
specialise_value
=
open_sale_order
.
getSpecialiseValue
(),
source
=
open_sale_order
.
getSource
(),
source_section
=
open_sale_order
.
getSourceSection
(),
source_project
=
open_sale_order
.
getSourceProject
(),
price_currency
=
open_sale_order
.
getPriceCurrency
(),
start_date
=
now
,
effective_date
=
now
,
resource
=
open_sale_order_line
.
getResource
(),
variation_category_list
=
open_sale_order_line
.
getVariationCategoryList
(),
quantity_unit
=
open_sale_order_line
.
getQuantityUnit
(),
aggregate
=
open_sale_order_cell
.
getAggregate
(
portal_type
=
[
'Instance Tree'
,
'Project'
,
'Compute Node'
]),
quantity
=
open_sale_order_cell
.
getQuantity
(),
# ledger="automated",
# XXX check that price is consistent with trade condition payable or not
price
=
open_sale_order_cell
.
getPrice
()
+
1
,
# XXX activate_kw=activate_kw
)
)
subscription_change_request
.
submit
()
subscription_change_request
.
setAggregateValue
(
instance_tree
)
subscription_change_request
.
setCausalityValue
(
open_sale_order
)
self
.
tic
()
self
.
tic
()
self
.
logout
()
self
.
logout
()
...
...
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