Commit 8217636f authored by Łukasz Nowak's avatar Łukasz Nowak

Cover SoftwareRelease.destroyed call.

Cover different cases of having already setup packing list.
parent de1f7214
......@@ -1354,6 +1354,24 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
CheckConfirmedPurchasePackingListB \
Logout'
prepare_two_cleanup_purchase_packing_list = \
prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsA \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout ' + \
prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsB \
CheckStoppedPurchasePackingListA \
CheckConfirmedPurchasePackingListB \
Logout'
prepare_another_computer_sequence_string = """
StoreComputerReference
LoginTestVifibAdmin
......@@ -2536,6 +2554,16 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_release._computer_guid = computer_guid
self.assertRaises(slap.NotFoundError, software_release.available)
def stepCheckNotFoundSoftwareReleaseDestroyedCall(self, sequence, **kw):
computer_guid = sequence["computer_reference"]
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
software_release = self.slap.registerSoftwareRelease(
sequence['software_release_uri'])
# Note: Hackish
software_release._computer_guid = computer_guid
self.assertRaises(slap.NotFoundError, software_release.destroyed)
def stepCheckTicAndNotFoundSoftwareReleaseAvailableCall(self, sequence, **kw):
"""
Check that calling SoftwareRelease.available raises NotFound
......@@ -2594,6 +2622,15 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.assertRaises(slap.NotFoundError, software_release.error, "ErrorLog")
def stepCheckNotFoundSoftwareReleaseDestroyedAfterRegisterCall(self, sequence,
**kw):
url = sequence["software_release_uri"]
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
software_release = self.slap.registerSoftwareRelease(url)
self.assertRaises(slap.NotFoundError, software_release.destroyed)
def stepCheckNotFoundSoftwareReleaseAvailableAfterRegisterCall(self, sequence,
**kw):
"""
......@@ -2619,6 +2656,15 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_release.available()
def stepCheckSuccessSoftwareReleaseDestroyedCall(self, sequence, **kw):
computer_guid = sequence["computer_reference"]
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
computer = self.slap.registerComputer(computer_guid)
software_release = computer.getSoftwareReleaseList()[0]
software_release.destroyed()
def stepCheckUnauthorizedSoftwareReleaseAvailableCall(self, sequence, **kw):
"""
Check that calling SoftwareRelease.available is Unauthorized
......@@ -3757,6 +3803,16 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_b_uid']).getSimulationState())
def stepCheckDeliveredPurchasePackingListA(self, sequence):
self.assertEqual('delivered',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_a_uid']).getSimulationState())
def stepCheckDeliveredPurchasePackingListB(self, sequence):
self.assertEqual('delivered',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_b_uid']).getSimulationState())
def stepCheckSlaveInstanceSecurityWithDifferentCustomer(self, sequence):
software_instance_uid = sequence["software_instance_uid"]
portal_membership = self.portal.portal_membership
......
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