Commit 126b5e49 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow code change.

Sale Orders can be confirmed, by SaleOrderLine_tryToAllocatePartition will not
allocate if not possible.
parent 4693b18f
...@@ -1193,7 +1193,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1193,7 +1193,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
LoginDefaultUser LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstanceSaleOrderConfirmRaisesValueError SoftwareInstanceSaleOrderLineNoPartitionFound
Logout Logout
SlapLoginTestVifibCustomer SlapLoginTestVifibCustomer
...@@ -1202,7 +1202,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin): ...@@ -1202,7 +1202,7 @@ class TestVifibSlapBug(TestVifibSlapWebServiceMixin):
SlapLogout SlapLogout
LoginDefaultUser LoginDefaultUser
SoftwareInstanceSaleOrderConfirmRaisesValueError SoftwareInstanceSaleOrderLineNoPartitionFound
Logout Logout
LoginERP5TypeTestCase LoginERP5TypeTestCase
......
...@@ -1118,7 +1118,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1118,7 +1118,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
Tic Tic
LoginDefaultUser LoginDefaultUser
SelectSlaveInstanceFromSaleOrderOrdered SelectSlaveInstanceFromSaleOrderOrdered
SoftwareInstanceSaleOrderConfirmRaisesValueError SoftwareInstanceSaleOrderLineNoPartitionFound
ConfirmOrderedSaleOrderActiveSense ConfirmOrderedSaleOrderActiveSense
Tic Tic
CheckComputerPartitionInstanceCleanupSalePackingListConfirmed CheckComputerPartitionInstanceCleanupSalePackingListConfirmed
...@@ -1244,7 +1244,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin): ...@@ -1244,7 +1244,7 @@ class TestVifibSlapComputerPartitionRequest(TestVifibSlapWebServiceMixin):
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
SelectSlaveInstanceFromSaleOrderOrdered \ SelectSlaveInstanceFromSaleOrderOrdered \
SoftwareInstanceSaleOrderConfirmRaisesValueError \ SoftwareInstanceSaleOrderLineNoPartitionFound \
Tic \ Tic \
CheckComputerPartitionInstanceSetupSalePackingListConfirmed \ CheckComputerPartitionInstanceSetupSalePackingListConfirmed \
Logout \ Logout \
......
...@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin): ...@@ -63,7 +63,7 @@ class TestVifibSlapOpenOrderRequest(TestVifibSlapWebServiceMixin):
LoginDefaultUser LoginDefaultUser
SetCurrentPersonSlapRequestedSoftwareInstance SetCurrentPersonSlapRequestedSoftwareInstance
SoftwareInstanceSaleOrderConfirmRaisesValueError SoftwareInstanceSaleOrderLineNoPartitionFound
Logout Logout
LoginERP5TypeTestCase LoginERP5TypeTestCase
......
...@@ -339,14 +339,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -339,14 +339,11 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
portal_type='Sale Order Line').getAggregateValue( portal_type='Sale Order Line').getAggregateValue(
portal_type='Hosting Subscription').getUid()) portal_type='Hosting Subscription').getUid())
def stepSoftwareInstanceSaleOrderConfirmRaisesValueError(self, sequence, def stepSoftwareInstanceSaleOrderLineNoPartitionFound(self, sequence,
**kw): **kw):
"""Checks that current software instance is realted only with sale order """Checks that current software instance is realted only with sale order
and that no partition is found
and that this sale order cannot be confirmed """
In Vifib implementation sale order which cannot find free computer partition
raises ValueError"""
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']) uid=sequence['software_instance_uid'])
...@@ -358,9 +355,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -358,9 +355,10 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.assertTrue(self.sale_order_line_portal_type in [q.getPortalType() for\ self.assertTrue(self.sale_order_line_portal_type in [q.getPortalType() for\
q in aggregate_value_list]) q in aggregate_value_list])
sale_order_line = aggregate_value_list[0] sale_order_line = aggregate_value_list[0]
sale_order = sale_order_line.getParentValue()
self.assertRaises(ValueError, sale_order.confirm) self.assertNotEqual('confirmed', sale_order_line.getSimulationState())
sale_order_line.SaleOrderLine_tryToAllocatePartition()
self.assertNotEqual('confirmed', sale_order_line.getSimulationState())
def stepCheckViewCurrentSoftwareInstance(self, sequence, **kw): def stepCheckViewCurrentSoftwareInstance(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue( software_instance = self.portal.portal_catalog.getResultValue(
......
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