Commit 3955a22e authored by Romain Courteaud's avatar Romain Courteaud

Update PL are not created by low level interaction (like setter)

parent 943972c1
...@@ -453,111 +453,6 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin): ...@@ -453,111 +453,6 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
# low level activity locks
def stepCheckActivityStartInProgress(self, sequence, **kw):
self.assertNotEqual(0, self.portal.portal_activities.
countMessageWithTag('%s_startInProgress' % sequence[
'software_instance_uid']))
def test_update_not_created_start_in_progress(self):
sequence_list = SequenceList()
sequence_string = \
self.prepare_stopped_computer_partition_sequence_string + """
LoginTestVifibCustomer
RequestSoftwareInstanceStart
Logout
LoginDefaultUser
CheckActivityStartInProgress
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceUpdate
Tic
Logout
LoginDefaultUser
CheckComputerPartitionNoInstanceUpdateSalePackingList
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepCheckActivityDestroyInProgress(self, sequence, **kw):
self.assertNotEqual(0, self.portal.portal_activities.
countMessageWithTag('%s_destroyInProgress' % sequence[
'software_instance_uid']))
def test_update_not_created_destruction_in_progress(self):
sequence_list = SequenceList()
sequence_string = self\
.prepare_installed_computer_partition_sequence_string + """
LoginTestVifibCustomer
RequestSoftwareInstanceDestroy
Logout
LoginDefaultUser
CheckActivityDestroyInProgress
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceUpdate
Tic
Logout
LoginDefaultUser
CheckComputerPartitionNoInstanceUpdateSalePackingList
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepCheckActivityRequestInProgress(self, sequence, **kw):
hosting_subscription_uid = sequence['hosting_subscription_uid']
requested_partition_reference = sequence.get('software_type', 'requested_reference')
tag = "%s_%s_inProgress" % (hosting_subscription_uid,
requested_partition_reference)
self.assertNotEqual(0, self.portal.portal_activities.
countMessageWithTag(tag))
def test_update_not_created_request_in_progress(self):
self.computer_partition_amount = 2
sequence_list = SequenceList()
sequence_string = self\
.prepare_install_requested_computer_partition_sequence_string + """
SlapLoginCurrentSoftwareInstance
RequestComputerPartitionNoTic
SlapLogout
LoginDefaultUser
CheckActivityRequestInProgress
Logout
LoginTestVifibCustomer
RequestSoftwareInstanceUpdate
Tic
Logout
LoginDefaultUser
CheckComputerPartitionNoInstanceUpdateSalePackingList
Logout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepCheckActivityPersonRequestInProgress(self, sequence, **kw): def stepCheckActivityPersonRequestInProgress(self, sequence, **kw):
person_uid = self.portal.ERP5Site_getAuthenticatedMemberPersonValue( person_uid = self.portal.ERP5Site_getAuthenticatedMemberPersonValue(
'test_vifib_customer').getUid() 'test_vifib_customer').getUid()
...@@ -617,158 +512,6 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin): ...@@ -617,158 +512,6 @@ class TestVifibSlapComputerPartitionUpdate(TestVifibSlapWebServiceMixin):
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
# update triggers
def stepSoftwareInstanceEditTitle(self, sequence,
**kw):
instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
instance.edit(
title = instance.getTitle() + 'edited'
)
def stepSoftwareInstanceEditSourceReference(self, sequence,
**kw):
instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
instance.edit(
source_reference = instance.getSourceReference() + 'edited'
)
def stepSoftwareInstanceEditTextContent(self, sequence,
**kw):
instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
text_content = instance.getTextContent()
modified_xml = """<?xml version="1.0" encoding="utf-8"?>
<instance><parameter id="ignore">value</parameter></instance>"""
self.assertNotEqual(modified_xml, text_content)
instance.edit(
text_content = modified_xml
)
def stepSoftwareInstanceEditConnectionXml(self, sequence,
**kw):
instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
connection_xml = instance.getConnectionXml()
self.assertNotEqual(connection_xml, self.minimal_correct_xml)
instance.edit(
connection_xml = self.minimal_correct_xml
)
def test_update_on_title_change(self):
sequence_list = SequenceList()
sequence_string = \
self.prepare_started_computer_partition_sequence_string + """
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginTestVifibCustomer
SoftwareInstanceEditTitle
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceUpdateSalePackingListDelivered
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_update_on_source_reference_change(self):
sequence_list = SequenceList()
sequence_string = \
self.prepare_started_computer_partition_sequence_string + """
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginTestVifibCustomer
SoftwareInstanceEditSourceReference
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceUpdateSalePackingListDelivered
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_update_on_text_content_change(self):
sequence_list = SequenceList()
sequence_string = \
self.prepare_started_computer_partition_sequence_string + """
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginTestVifibCustomer
SoftwareInstanceEditTextContent
Tic
Logout
LoginDefaultUser
CheckComputerPartitionInstanceUpdateSalePackingListDelivered
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_no_update_on_connection_xml_change(self):
sequence_list = SequenceList()
sequence_string = \
self.prepare_started_computer_partition_sequence_string + """
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginTestVifibCustomer
SoftwareInstanceEditConnectionXml
Tic
Logout
LoginDefaultUser
CheckComputerPartitionNoInstanceUpdateSalePackingList
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
SlapLogout
LoginERP5TypeTestCase
CheckSiteConsistency
Logout
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestVifibSlapComputerPartitionUpdate)) suite.addTest(unittest.makeSuite(TestVifibSlapComputerPartitionUpdate))
......
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