Commit 5681145d authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Tomáš Peterka

slapos_cloud: Fix expected message after update of library

The library was updated so the expected message changed.
Update the assertion to verbose more clearly what is wrong.
parent 5bfa31be
......@@ -150,7 +150,7 @@ class TestSlapOSSoftwareInstanceConstraint(TestSlapOSConstraintMixin):
current_message_list = self.getMessageList(self.software_instance)
consistency_message = "Connection XML is invalid: Start tag expected, '<' not "\
"found, line 1, column 1"
"found, line 1, column 1 (line 1)"
# test the test: no expected message found
self.assertFalse(consistency_message in current_message_list)
......@@ -167,7 +167,9 @@ class TestSlapOSSoftwareInstanceConstraint(TestSlapOSConstraintMixin):
# if available shall be correct XML
self.software_instance.edit(connection_xml='this is bad xml')
self.assertTrue(consistency_message in self.getMessageList(self.software_instance))
self.assertTrue(consistency_message in self.getMessageList(self.software_instance),
"'%s' is not in '%s'" % (consistency_message,
self.getMessageList(self.software_instance)))
self.software_instance.edit(connection_xml=self.generateEmptyXml())
self.assertFalse(consistency_message in self.getMessageList(self.software_instance))
......@@ -270,7 +272,7 @@ class TestSlapOSSoftwareInstanceConstraint(TestSlapOSConstraintMixin):
current_message_list = self.getMessageList(self.software_instance)
consistency_message = "Sla XML is invalid: Start tag expected, '<' not "\
"found, line 1, column 1"
"found, line 1, column 1 (line 1)"
# test the test: no expected message found
self.assertFalse(consistency_message in current_message_list)
......@@ -287,7 +289,9 @@ class TestSlapOSSoftwareInstanceConstraint(TestSlapOSConstraintMixin):
# if available shall be correct XML
self.software_instance.edit(sla_xml='this is bad xml')
self.assertTrue(consistency_message in self.getMessageList(self.software_instance))
self.assertTrue(consistency_message in self.getMessageList(self.software_instance),
"'%s' is not in '%s'" % (consistency_message,
self.getMessageList(self.software_instance)))
self.software_instance.edit(sla_xml=self.generateEmptyXml())
self.assertFalse(consistency_message in self.getMessageList(self.software_instance))
......@@ -298,7 +302,7 @@ class TestSlapOSSoftwareInstanceConstraint(TestSlapOSConstraintMixin):
current_message_list = self.getMessageList(self.software_instance)
consistency_message = "Instance XML is invalid: Start tag expected, '<' not "\
"found, line 1, column 1"
"found, line 1, column 1 (line 1)"
# test the test: no expected message found
self.assertFalse(consistency_message in current_message_list)
......@@ -315,7 +319,9 @@ class TestSlapOSSoftwareInstanceConstraint(TestSlapOSConstraintMixin):
# if available shall be correct XML
self.software_instance.edit(text_content='this is bad xml')
self.assertTrue(consistency_message in self.getMessageList(self.software_instance))
self.assertTrue(consistency_message in self.getMessageList(self.software_instance),
"'%s' is not in '%s'" % (consistency_message,
self.getMessageList(self.software_instance)))
self.software_instance.edit(text_content=self.generateEmptyXml())
self.assertFalse(consistency_message in self.getMessageList(self.software_instance))
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudConstraint</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudConstraint</string> </value>
......@@ -43,13 +55,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -62,7 +89,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -71,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......
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