Commit 86918ead authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: test: reuse script

parent e49e6ca2
...@@ -132,41 +132,12 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe ...@@ -132,41 +132,12 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
self.checkServiceSubscriptionRequest(instance_tree) self.checkServiceSubscriptionRequest(instance_tree)
self.tic() self.tic()
"""
self.login(person_user_id)
self.personRequestInstance(
software_release=software_release,
software_type=software_type,
partition_reference=public_instance_title,
project_reference=project_reference
)
"""
"""
self.checkInstanceAllocation(public_person.getUserId(),
public_reference, public_instance_title,
public_server_software, public_instance_type,
public_server, project.getReference())
"""
self.login(sale_person.getUserId())
open_sale_order_cell = self.portal.portal_catalog.getResultValue( self.login(sale_person.getUserId())
portal_type='Open Sale Order Cell', subscription_change_request = public_person2.Person_claimSlaposItemSubscription(
aggregate__uid=instance_tree.getUid(), instance_tree.getReference(),
validation_state='validated' None
)
open_sale_order_line = open_sale_order_cell.getParentValue()
open_sale_order = open_sale_order_line.getParentValue()
subscription_change_request = open_sale_order_cell.getResourceValue().Resource_createSubscriptionRequest(
public_person2,
# [software_type, software_release],
open_sale_order_cell.getVariationCategoryList(),
open_sale_order.getSourceProjectValue(),
currency_value=open_sale_order.getPriceCurrencyValue(),
portal_type='Subscription Change Request'
) )
subscription_change_request.setAggregateValue(instance_tree)
subscription_change_request.setCausalityValue(open_sale_order)
self.tic() self.tic()
self.logout() self.logout()
...@@ -209,10 +180,11 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe ...@@ -209,10 +180,11 @@ class TestSlapOSSubscriptionChangeRequestScenario(TestSlapOSSubscriptionChangeRe
inventory_list = self.portal.portal_simulation.getCurrentInventoryList(**inventory_list_kw) inventory_list = self.portal.portal_simulation.getCurrentInventoryList(**inventory_list_kw)
self.assertEquals(3, len(inventory_list)) self.assertEquals(3, len(inventory_list))
tracking_list = instance_tree.Item_getTrackingList() # tracking_list = instance_tree.Item_getTrackingList()
self.assertEquals(2, len(tracking_list)) # self.assertEquals(2, len(tracking_list))
# XXX TODO self.assertEquals(None, self.portal.portal_simulation.getInventoryList())
self.assertEquals(None, self.portal.portal_simulation.getInventoryList())
# Ensure no unexpected object has been created # Ensure no unexpected object has been created
# 2 credential request # 2 credential request
# 1 instance tree # 1 instance tree
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment