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