Commit 113f3518 authored by Romain Courteaud's avatar Romain Courteaud

Drop purchase packing list state tests.

Software release installation status does not depend anymore on Purchase
Packing List state.
parent d8d239a2
......@@ -114,493 +114,6 @@ class TestVifibSlapComputerGetSoftwareReleaseList(TestVifibSlapWebServiceMixin):
c.invalidate()
transaction.commit()
def test_Computer_getSoftwareReleaseList_SetupResource_ConfirmedState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
confirmed state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_ConfirmedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout ' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_CancelledState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
cancelled state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_CancelledState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_StartedState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
started state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_StartedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_StoppedState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
stopped state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_StoppedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_DeliveredState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_SetupResource_DeliveredState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_published_software_release + \
self.prepare_formated_computer + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_CleanupResource_StartedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_published_software_release + \
self.prepare_formated_computer + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_CleanupResource_StoppedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_published_software_release + \
self.prepare_formated_computer + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_CleanupResource_DeliveredState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_published_software_release + \
self.prepare_formated_computer + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_CleanupResource_CancelledState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_published_software_release + \
self.prepare_formated_computer + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_AccountingResource_ConfirmedState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
confirmed state with the accounting resource
"""
sequence_list = SequenceList()
sequence_string = \
self.prepare_software_release_purchase_packing_list_accounting_resource + '\
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_AccountingResource_CancelledState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
cancelled state with the accounting resource
"""
sequence_list = SequenceList()
sequence_string = \
self.prepare_software_release_purchase_packing_list_accounting_resource + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_AccountingResource_StartedState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
started state with the accounting resource
"""
sequence_list = SequenceList()
sequence_string = \
self.prepare_software_release_purchase_packing_list_accounting_resource + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_AccountingResource_StoppedState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
stopped state with the accounting resource
"""
sequence_list = SequenceList()
sequence_string = \
self.prepare_software_release_purchase_packing_list_accounting_resource + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_AccountingResource_DeliveredState(self):
"""
Check that calling Computer.getSoftwareReleaseList works in
delivered state with the accounting resource
"""
sequence_list = SequenceList()
sequence_string = \
self.prepare_software_release_purchase_packing_list_accounting_resource + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckEmptyComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_twoPurchasePackingList(self):
"""
Check that calling Computer.getSoftwareReleaseList uses the
Purchase Packing List in proper state, regardless its date
"""
sequence_list = SequenceList()
sequence_string = self.prepare_two_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginDefaultUser \
StepPurchasePackingListBStartDateAfterPurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginDefaultUser \
StepPurchasePackingListBStartDateBeforePurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_getSoftwareReleaseList_twoActivePurchasePackingList(self):
"""
Check that getSoftwareReleaseList only returns 1 software release if it is
associated to 2 purchase packing list.
"""
sequence_list = SequenceList()
sequence_string = \
self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
Tic \
CreatePurchasePackingList \
Tic \
CreatePurchasePackingListLine \
Tic \
SetPurchasePackingListLineSetupResource \
SetPurchasePackingListLineAggregate \
ConfirmPurchasePackingList \
StartBuildingPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVifibSlapComputerGetSoftwareReleaseList))
......
......@@ -25,314 +25,6 @@ class TestVifibSlapSoftwareReleaseAvailable(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_SetupResource_ConfirmedState(self):
"""
Check that calling SoftwareRelease.available works in
confirmed state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingList \
CheckSoftwareReleaseAvailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_available_SetupResource_ConfirmedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsA \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout ' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsB \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
CheckSuccessSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckSoftwareReleaseAvailableForRequest \
CheckStoppedPurchasePackingListA \
CheckConfirmedPurchasePackingListB \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_SetupResource_CancelledState(self):
"""
Check that calling SoftwareRelease.available works in
cancelled state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
CheckCancelledPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_CleanupResource_CancelledState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_SetupResource_StartedState(self):
"""
Check that calling SoftwareRelease.available works in
started state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingList \
CheckSoftwareReleaseAvailableForRequest \
CheckSoftwareReleaseInPublicTable \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_CleanupResource_StartedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_SetupResource_StoppedState(self):
"""
Check that calling SoftwareRelease.available works in
stopped state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
CheckSoftwareReleaseAvailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingList \
CheckSoftwareReleaseAvailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_CleanupResource_StoppedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_SetupResource_DeliveredState(self):
"""
Check that calling SoftwareRelease.available works in
delivered state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
DeliverPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_CleanupResource_DeliveredState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_twoPurchasePackingList(self):
"""
Check that calling SoftwareRelease.available uses the latest purchase packing
list for calculation
"""
sequence_list = SequenceList()
sequence_string = self.prepare_two_purchase_packing_list + '\
LoginDefaultUser \
StepPurchasePackingListBStartDateAfterPurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingListB \
Logout\
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_string = self.prepare_two_purchase_packing_list + '\
LoginDefaultUser \
StepPurchasePackingListBStartDateBeforePurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingListB \
Logout\
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVifibSlapSoftwareReleaseAvailable))
......
......@@ -25,314 +25,6 @@ class TestVifibSlapSoftwareReleaseBuilding(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_SetupResource_ConfirmedState(self):
"""
Check that calling SoftwareRelease.building works in
confirmed state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStartedPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_Computer_building_SetupResource_ConfirmedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
SetCurrentPurchasePackingListAsA \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout ' + self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsB \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
CheckSuccessSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
CheckStartedPurchasePackingListA \
CheckConfirmedPurchasePackingListB \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
CheckDestroyedStateGetSoftwareReleaseListCall \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_SetupResource_CancelledState(self):
"""
Check that calling SoftwareRelease.building works in
cancelled state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
SlapLogout \
LoginDefaultUser \
CheckCancelledPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_CleanupResource_CancelledState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_SetupResource_StartedState(self):
"""
Check that calling SoftwareRelease.building works in
started state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStartedPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_CleanupResource_StartedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_SetupResource_StoppedState(self):
"""
Check that calling SoftwareRelease.building works in
stopped state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
CheckSoftwareReleaseAvailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingList \
CheckSoftwareReleaseAvailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_CleanupResource_StoppedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_SetupResource_DeliveredState(self):
"""
Check that calling SoftwareRelease.building works in
delivered state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
DeliverPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_CleanupResource_DeliveredState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_building_twoPurchasePackingList(self):
"""
Check that calling SoftwareRelease.building uses the Purchase Packing List
in proper state, regardless its date
"""
sequence_list = SequenceList()
sequence_string = self.prepare_two_purchase_packing_list + '\
LoginDefaultUser \
StepPurchasePackingListBStartDateAfterPurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStartedPurchasePackingListB \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_string = self.prepare_two_purchase_packing_list + '\
LoginDefaultUser \
StepPurchasePackingListBStartDateBeforePurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseBuildingCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStartedPurchasePackingListB \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVifibSlapSoftwareReleaseBuilding))
......
......@@ -21,25 +21,6 @@ class TestVifibSlapSoftwareReleaseDestroyed(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
......@@ -56,372 +37,6 @@ class TestVifibSlapSoftwareReleaseDestroyed(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_ConfirmedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsA \
Logout ' + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
SetCurrentPurchasePackingListAsB \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_StartedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
SetCurrentPurchasePackingListAsA \
Logout' + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
SetCurrentPurchasePackingListAsB \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_StoppedState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
CheckSoftwareReleaseInPublicTable \
CheckSoftwareReleaseAvailableForRequest \
SetCurrentPurchasePackingListAsA \
Logout' + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
SetCurrentPurchasePackingListAsB \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_DeliveredState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
CheckSoftwareReleaseAvailableForRequest \
DeliverPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SetCurrentPurchasePackingListAsA \
Logout' + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
SetCurrentPurchasePackingListAsB \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_CancelledState_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
SetCurrentPurchasePackingListAsA \
Logout' + \
self.prepare_software_release_cleanup_confirmed_packing_list + '\
SetCurrentPurchasePackingListAsB \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
LoginDefaultUser \
CheckCancelledPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_CancelledState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckCancelledPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
CheckSoftwareReleaseNotInPublicTable \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_CleanupResource_CancelledState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_available_CleanupResource_StartedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_StartedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_CleanupResource_StoppedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckStoppedPurchasePackingList \
CheckSoftwareReleaseUnavailableForRequest \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_StoppedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_CleanupResource_DeliveredState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_SetupResource_DeliveredState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
StopPurchasePackingList \
Tic \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckNotFoundSoftwareReleaseAvailableCall \
Tic \
SlapLogout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_destroyed_twoPurchasePackingList(self):
sequence_list = SequenceList()
sequence_string = self.prepare_two_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StepPurchasePackingListBStartDateAfterPurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
Logout\
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_string = self.prepare_two_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StepPurchasePackingListBStartDateBeforePurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseDestroyedCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckDeliveredPurchasePackingListA \
CheckDeliveredPurchasePackingListB \
Logout\
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVifibSlapSoftwareReleaseDestroyed))
......
......@@ -25,292 +25,6 @@ class TestVifibSlapSoftwareReleaseError(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_SetupResource_ConfirmedState(self):
"""
Check that calling SoftwareRelease.error works in
confirmed state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListErrorText \
CheckConfirmedPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_SetupResource_CancelledState(self):
"""
Check that calling SoftwareRelease.error works in
cancelled state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListNoErrorText \
CheckCancelledPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_SetupResource_StartedState(self):
"""
Check that calling SoftwareRelease.error works in
started state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListErrorText \
CheckStartedPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_SetupResource_StoppedState(self):
"""
Check that calling SoftwareRelease.error works in
stopped state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListNoErrorText \
CheckStoppedPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_SetupResource_DeliveredState(self):
"""
Check that calling SoftwareRelease.error works in
delivered state with the setup resource
"""
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListNoErrorText \
CheckDeliveredPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_CleanupResource_ConfirmedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListErrorText \
CheckConfirmedPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_CleanupResource_CancelledState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
CancelPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListNoErrorText \
CheckCancelledPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_CleanupResource_StartedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListErrorText \
CheckStartedPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_CleanupResource_StoppedState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListNoErrorText \
CheckStoppedPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_CleanupResource_DeliveredState(self):
sequence_list = SequenceList()
sequence_string = self.prepare_software_release_cleanup_purchase_packing_list + '\
LoginDefaultUser \
StartPurchasePackingList \
StopPurchasePackingList \
DeliverPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListNoErrorText \
CheckDeliveredPurchasePackingList \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_SoftwareRelease_error_twoPurchasePackingList(self):
"""
Check that calling SoftwareRelease.error uses the latest purchase packing
list for calculation
"""
sequence_list = SequenceList()
sequence_string = self.prepare_two_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginDefaultUser \
StepPurchasePackingListBStartDateAfterPurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListErrorText \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_string = self.prepare_two_purchase_packing_list + '\
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout \
LoginDefaultUser \
StepPurchasePackingListBStartDateBeforePurchasePackingListA \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessSoftwareReleaseErrorCall \
Tic \
SlapLogout \
LoginDefaultUser \
CheckPurchasePackingListErrorText \
Logout \
LoginERP5TypeTestCase \
CheckSiteConsistency \
Logout \
'
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite():
suite = unittest.TestSuite()
......
......@@ -20,13 +20,6 @@ class TestVifibSlapSupply(TestVifibSlapWebServiceMixin):
# Supply.supply
########################################
def stepSupplyComputerSoftwareReleaseAvailable(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
supply = self.slap.registerSupply()
supply.supply(sequence['software_release_uri'],
sequence['computer_reference'], 'available')
def stepSupplyComputerSoftwareReleaseAvailableRaisesNotImplementedError(self,
sequence, **kw):
# slap not used to raise on server side
......@@ -36,13 +29,6 @@ class TestVifibSlapSupply(TestVifibSlapWebServiceMixin):
computer.requestSoftwareRelease,
software_release_url=sequence['software_release_uri'], state='available')
def stepSupplyComputerSoftwareReleaseDestroyed(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
supply = self.slap.registerSupply()
supply.supply(sequence['software_release_uri'],
sequence['computer_reference'], 'destroyed')
def stepSupplyComputerSoftwareReleaseDestroyedRaisesNotImplementedError(self,
sequence, **kw):
# slap not used to raise on server side
......
......@@ -88,8 +88,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_portal_type = "Computer Partition"
computer_portal_type = "Computer"
hosting_subscription_portal_type = "Hosting Subscription"
purchase_packing_list_line_portal_type = "Purchase Packing List Line"
purchase_packing_list_portal_type = "Purchase Packing List"
sale_packing_list_line_portal_type = "Sale Packing List Line"
sale_order_line_portal_type = "Sale Order Line"
sale_packing_list_portal_type = "Sale Packing List"
......@@ -1044,69 +1042,20 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
SlapLogout
"""
prepare_software_release_confirmed_packing_list = """
prepare_supply_software_release = """
LoginDefaultUser
CreatePurchasePackingList
SupplyComputerSoftwareReleaseAvailable
Tic
CreatePurchasePackingListLine
Tic
SetPurchasePackingListLineSetupResource
SetPurchasePackingListLineAggregate
ConfirmPurchasePackingList
StartBuildingPurchasePackingList
Tic
CheckConfirmedPurchasePackingList
Logout
"""
prepare_software_release_cleanup_confirmed_packing_list = """
LoginDefaultUser
CreatePurchasePackingList
Tic
CreatePurchasePackingListLine
Tic
SetPurchasePackingListLineCleanupResource
SetPurchasePackingListLineAggregate
ConfirmPurchasePackingList
StartBuildingPurchasePackingList
Tic
CheckConfirmedPurchasePackingList
Logout
"""
prepare_software_release_purchase_packing_list = \
prepare_published_software_release + prepare_formated_computer + \
prepare_software_release_confirmed_packing_list + '\
prepare_supply_software_release + '\
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
Logout'
prepare_software_release_cleanup_purchase_packing_list = \
prepare_published_software_release + prepare_formated_computer + \
prepare_software_release_cleanup_confirmed_packing_list + '\
LoginDefaultUser \
CheckSoftwareReleaseUnavailableForRequest \
Logout'
prepare_software_release_purchase_packing_list_accounting_resource = \
prepare_published_software_release + prepare_formated_computer + """
LoginDefaultUser
CreateAccountingService
CreatePurchasePackingList
Tic
CreatePurchasePackingListLine
Tic
SetPurchasePackingListLineAccountingResource
SetPurchasePackingListLineAggregate
ConfirmPurchasePackingList
StartBuildingPurchasePackingList
Tic
Logout
LoginDefaultUser
CheckSoftwareReleaseUnavailableForRequest
Logout
"""
prepare_installed_software_release_sequence_string = \
prepare_published_software_release + \
prepare_formated_computer + """
......@@ -1353,36 +1302,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
Logout
"""
computer_with_software_release = """
CustomerRegisterNewComputer
Tic
SetComputerCoordinatesFromComputerTitle
ComputerSetAllocationScopeOpenPublic
Tic
CreatePurchasePackingList
Tic
CreatePurchasePackingListLine
Tic
SelectNewSoftwareReleaseUri
CreateSoftwareRelease
Tic \
SubmitSoftwareRelease \
Tic \
CreateSoftwareProduct \
Tic \
ValidateSoftwareProduct \
Tic \
SetSoftwareProductToSoftwareRelease \
PublishByActionSoftwareRelease \
Tic
SetPurchasePackingListLineSetupResource
SetPurchasePackingListLineAggregate
ConfirmPurchasePackingList
StopPurchasePackingList
StartBuildingPurchasePackingList
Tic
"""
requesting_computer_partition_with_software_instance = """
SelectNewComputerPartitionReference
CreateComputerPartition
......@@ -1415,42 +1334,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
SelectCurrentComputerPartitionAsSlaveOwner
"""
prepare_two_purchase_packing_list = \
prepare_software_release_purchase_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsA \
StartPurchasePackingList \
StopPurchasePackingList \
Tic \
Logout \
SlapLoginCurrentComputer \
CheckSuccessComputerGetSoftwareReleaseListCall \
SlapLogout ' + \
prepare_software_release_confirmed_packing_list + '\
LoginDefaultUser \
SetCurrentPurchasePackingListAsB \
CheckStoppedPurchasePackingListA \
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
......@@ -1543,6 +1426,20 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
# Steps
########################################
def stepSupplyComputerSoftwareReleaseAvailable(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
supply = self.slap.registerSupply()
supply.supply(sequence['software_release_uri'],
sequence['computer_reference'], 'available')
def stepSupplyComputerSoftwareReleaseDestroyed(self, sequence, **kw):
self.slap = slap.slap()
self.slap.initializeConnection(self.server_url, timeout=None)
supply = self.slap.registerSupply()
supply.supply(sequence['software_release_uri'],
sequence['computer_reference'], 'destroyed')
def stepResetSequenceSoftwareInstanceState(self, sequence, **kw):
sequence['software_instance_state'] = ''
......@@ -2540,96 +2437,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.assertTrue(isinstance(computer.getSoftwareReleaseList()[0],
slap.SoftwareRelease))
def stepStartBuildingPurchasePackingList(self, sequence, **kw):
delivery = self.portal.portal_catalog.getResultValue(
uid=sequence['purchase_packing_list_uid'])
delivery.startBuilding()
def stepCreatePurchasePackingList(self, sequence, **kw):
"""
Create an purchase packing list document.
"""
module = self.portal.getDefaultModule(
portal_type=self.purchase_packing_list_portal_type)
order = module.newContent(
portal_type=self.purchase_packing_list_portal_type,
start_date=DateTime(),
specialise='sale_trade_condition_module/vifib_trade_condition',
source='organisation_module/vifib_internet',
source_section='organisation_module/vifib_internet',
source_decision='organisation_module/vifib_internet',
# XXX Hardcoded values
destination='person_module/test_vifib_customer',
destination_section='person_module/test_vifib_customer',
destination_decision='person_module/test_vifib_customer',
price_currency='currency_module/EUR',
)
self.markManualCreation(order)
sequence.edit(purchase_packing_list_uid=order.getUid())
def stepCreatePurchasePackingListLine(self, sequence, **kw):
"""
Create an purchase packing list line document.
"""
order = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
line = order.newContent(
portal_type=self.purchase_packing_list_line_portal_type,
quantity=1)
self.markManualCreation(line)
sequence.edit(purchase_packing_list_line_uid=line.getUid())
def stepSetPurchasePackingListLineAggregate(self, sequence, **kw):
"""
Associate a computer and a software release to the purchase packing list line.
"""
line = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_line_uid"])
line.edit(
aggregate_uid_list=[sequence["computer_uid"],
sequence["software_release_uid"]]
)
def stepConfirmPurchasePackingList(self, sequence, **kw):
"""
Confirm the purchase packing list
"""
order = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
order.portal_workflow.doActionFor(order, 'confirm_action')
def stepStartPurchasePackingList(self, sequence, **kw):
"""
Start the purchase packing list
"""
order = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
order.portal_workflow.doActionFor(order, 'start_action')
def stepStopPurchasePackingList(self, sequence, **kw):
"""
Stop the purchase packing list
"""
order = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
order.portal_workflow.doActionFor(order, 'stop_action')
def stepDeliverPurchasePackingList(self, sequence, **kw):
"""
Deliver the purchase packing list
"""
order = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
order.portal_workflow.doActionFor(order, 'deliver_action')
def stepCancelPurchasePackingList(self, sequence, **kw):
"""
Cancel the purchase packing list
"""
order = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
order.portal_workflow.doActionFor(order, 'cancel_action')
def stepCheckNotFoundSoftwareReleaseBuildingAfterRegisterCall(self,
sequence, **kw):
"""
......@@ -2655,22 +2462,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_release.building()
def stepCheckConfirmedPurchasePackingList(self, sequence, **kw):
"""
Check that the purchase packing list is confirmed.
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertEquals("confirmed", packing_list.getSimulationState())
def stepCheckStartedPurchasePackingList(self, sequence, **kw):
"""
Check that the purchase packing list is started.
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertEquals("started", packing_list.getSimulationState())
def stepCheckNotFoundSoftwareReleaseBuildingCall(self, sequence, **kw):
computer_guid = sequence["computer_reference"]
self.slap = slap.slap()
......@@ -2834,22 +2625,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
self.assertRaises(slap.Unauthorized, software_release.available)
def stepCheckStoppedPurchasePackingList(self, sequence, **kw):
"""
Check that the purchase packing list is started.
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertEquals("stopped", packing_list.getSimulationState())
def stepCheckDeliveredPurchasePackingList(self, sequence, **kw):
"""
Check that the purchase packing list is started.
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertEquals("delivered", packing_list.getSimulationState())
def stepCheckNotFoundSoftwareReleaseErrorAfterRegisterCall(self, sequence,
**kw):
"""
......@@ -2875,30 +2650,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_release.error("ErrorLog")
def stepCheckCancelledPurchasePackingList(self, sequence, **kw):
"""
Check that the purchase packing list is cancelled
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertEquals("cancelled", packing_list.getSimulationState())
def stepCheckPurchasePackingListErrorText(self, sequence, **kw):
"""
Check that the purchase packing list is cancelled
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertFalse(packing_list.getComment('').endswith("ErrorLog"))
def stepCheckPurchasePackingListNoErrorText(self, sequence, **kw):
"""
Check that the purchase packing list is cancelled
"""
packing_list = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_uid"])
self.assertFalse(packing_list.getComment('').endswith("ErrorLog"))
def stepCheckUnauthorizedSoftwareReleaseBuildingCall(self, sequence, **kw):
"""
Check that calling SoftwareRelease.building raises an Unauthorized error
......@@ -3044,17 +2795,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
service_uid = sequence['service_uid']
line.edit(resource_uid=service_uid)
def stepSetPurchasePackingListLineAccountingResource(self, sequence, **kw):
"""
Associate an accounting service to the purchase packing list line.
"""
line = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_line_uid"])
service_uid = sequence['service_uid']
line.edit(
quantity=1,
resource_uid=service_uid)
def stepSetSalePackingListLineAggregate(self, sequence, **kw):
"""
Associate a computer and a software release to the sale packing list line.
......@@ -3720,56 +3460,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
movement.portal_preferences.getPreferredInstanceHostingResource():
movement.edit(start_date=hosting_date)
def stepSetPurchasePackingListLineSetupResource(self, sequence, **kw):
"""
Associate the setup service to the purchase packing list line.
"""
line = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_line_uid"])
line.edit(
quantity=1,
resource=self.portal.portal_preferences.\
getPreferredSoftwareSetupResource())
def stepSetPurchasePackingListLineCleanupResource(self, sequence, **kw):
"""
Associate the setup service to the purchase packing list line.
"""
line = self.portal.portal_catalog.getResultValue(
uid=sequence["purchase_packing_list_line_uid"])
line.edit(
quantity=1,
resource=self.portal.portal_preferences.\
getPreferredSoftwareCleanupResource())
def stepSetAccountingBeforeSetupStartDate(self, sequence, **kw):
"""
Set date on Purchase Packing List Line
"""
computer_partition_uid = sequence["computer_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
hosting_date = DateTime() - 1
service_uid = sequence['service_uid']
for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.purchase_packing_list_line_portal_type):
if movement.getResourceUid() == service_uid:
movement.edit(start_date=hosting_date)
def stepSetAccountingAfterSetupStartDate(self, sequence, **kw):
"""
Set date on Purchase Packing List Line
"""
computer_partition_uid = sequence["computer_uid"]
computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid)
hosting_date = DateTime() + 1
service_uid = sequence['service_uid']
for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type):
if movement.getResourceUid() == service_uid:
movement.edit(start_date=hosting_date)
def _checkComputerPartitionAndRelatedSoftwareInstance(self,
computer_partition):
sale_packing_list_line_list = computer_partition\
......@@ -3930,70 +3620,6 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
software_instance_uid=sequence['requester_software_instance_uid']
)
def stepSetCurrentPurchasePackingListAsA(self, sequence):
sequence.edit(purchase_packing_list_a_uid=sequence[
'purchase_packing_list_uid'])
def stepSetCurrentPurchasePackingListAsB(self, sequence):
sequence.edit(purchase_packing_list_b_uid=sequence[
'purchase_packing_list_uid'])
def stepStepPurchasePackingListBStartDateAfterPurchasePackingListA(self,
sequence):
a = self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_a_uid'])
b = self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_b_uid'])
b.setStartDate(a.getStartDate() + 2)
def stepStepPurchasePackingListBStartDateBeforePurchasePackingListA(self,
sequence):
a = self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_a_uid'])
b = self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_b_uid'])
b.setStartDate(a.getStartDate() - 2)
def stepCheckStartedPurchasePackingListA(self, sequence):
self.assertEqual('started',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_a_uid']).getSimulationState())
def stepCheckStoppedPurchasePackingListA(self, sequence):
self.assertEqual('stopped',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_a_uid']).getSimulationState())
def stepCheckCancelledPurchasePackingListA(self, sequence):
self.assertEqual('cancelled',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_a_uid']).getSimulationState())
def stepCheckConfirmedPurchasePackingListB(self, sequence):
self.assertEqual('confirmed',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_b_uid']).getSimulationState())
def stepCheckStartedPurchasePackingListB(self, sequence):
self.assertEqual('started',
self.portal.portal_catalog.getResultValue(uid=sequence[
'purchase_packing_list_b_uid']).getSimulationState())
def stepCheckStoppedPurchasePackingListB(self, sequence):
self.assertEqual('stopped',
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