Commit 09f56b7b authored by Łukasz Nowak's avatar Łukasz Nowak

Check impact of Software Release state on request availability.

parent 2a68ce9e
...@@ -32,12 +32,16 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin): ...@@ -32,12 +32,16 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin):
""" """
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\ sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \ SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseAvailableCall \ CheckSuccessSoftwareReleaseAvailableCall \
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CheckStoppedPurchasePackingList \ CheckStoppedPurchasePackingList \
CheckSoftwareReleaseAvailableForRequest \
Logout \ Logout \
LoginERP5TypeTestCase \ LoginERP5TypeTestCase \
CheckSiteConsistency \ CheckSiteConsistency \
...@@ -49,6 +53,9 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin): ...@@ -49,6 +53,9 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin):
def test_Computer_available_SetupResource_ConfirmedState_CleanupResource_ConfirmedState(self): def test_Computer_available_SetupResource_ConfirmedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList() sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\ sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginDefaultUser \ LoginDefaultUser \
SetCurrentPurchasePackingListAsA \ SetCurrentPurchasePackingListAsA \
Logout \ Logout \
...@@ -65,6 +72,7 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin): ...@@ -65,6 +72,7 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin):
Tic \ Tic \
SlapLogout \ SlapLogout \
LoginDefaultUser \ LoginDefaultUser \
CheckSoftwareReleaseAvailableForRequest \
CheckStoppedPurchasePackingListA \ CheckStoppedPurchasePackingListA \
CheckConfirmedPurchasePackingListB \ CheckConfirmedPurchasePackingListB \
Logout \ Logout \
...@@ -77,6 +85,7 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin): ...@@ -77,6 +85,7 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin):
LoginDefaultUser \ LoginDefaultUser \
CheckDeliveredPurchasePackingListA \ CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \ CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
Logout \ Logout \
LoginERP5TypeTestCase \ LoginERP5TypeTestCase \
CheckSiteConsistency \ CheckSiteConsistency \
......
...@@ -220,6 +220,19 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -220,6 +220,19 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
slap_computer_partition.request(**kw) slap_computer_partition.request(**kw)
def _getRequestBasedComputerPartitionCount(self, sequence):
return self.portal.portal_catalog.countResults(
portal_type='Computer Partition',
parent_uid=sequence['computer_uid'],
software_release_url=sequence['software_release_uri'],
free_for_request=1)[0][0]
def stepCheckSoftwareReleaseAvailableForRequest(self, sequence, **kw):
self.assertFalse(self._getRequestBasedComputerPartitionCount(sequence) == 0)
def stepCheckSoftwareReleaseUnavailableForRequest(self, sequence, **kw):
self.assertTrue(self._getRequestBasedComputerPartitionCount(sequence) == 0)
def stepTriggerConfirmPlannedInvoiceAlarm(self, sequence, **kw): def stepTriggerConfirmPlannedInvoiceAlarm(self, sequence, **kw):
sm = getSecurityManager() sm = getSecurityManager()
self.login() self.login()
......
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