Commit af40cef0 authored by Łukasz Nowak's avatar Łukasz Nowak

Check damaged instance_xml.

parent b1d02767
...@@ -589,6 +589,30 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin ...@@ -589,6 +589,30 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def stepDamageSoftwareInstanceXml(self, sequence, **kw):
software_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
software_instance.edit(text_content="""
DAMAGED<BAD?xml XMLversion="1.0" encoding="utf-8"?>""")
def test_Computer_getComputerPartitionList_damaged_instance_xml(self):
"""Check that getComputerPartitionList works in case of damaged XML on instance."""
sequence_list = SequenceList()
sequence_string = self\
.prepare_install_requested_computer_partition_sequence_string + """
LoginDefaultUser
DamageSoftwareInstanceXml
Logout
SlapLoginCurrentComputer
CheckSuccessComputerGetComputerPartitionCall
Tic
SlapLogout
"""
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(TestVifibSlapComputerGetComputerPartitionList)) suite.addTest(unittest.makeSuite(TestVifibSlapComputerGetComputerPartitionList))
......
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