Commit bb3d4554 by Rafael Monnerat

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.
1 parent 2acee53f
......@@ -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))
......
......@@ -7,10 +7,22 @@
<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>
</item>
......@@ -43,7 +55,7 @@
<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>
......@@ -58,11 +70,26 @@
<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>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<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>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!