From f25d02284f715c294ce09dea4d75248d24689093 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Mon, 5 Nov 2012 19:46:14 +0900
Subject: [PATCH] Add unit test helper to get the checkConsistency() error
 messages as string.

---
 product/ERP5Type/tests/ERP5TypeTestCase.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py
index ad6aa35ca1..26b94f0e6f 100644
--- a/product/ERP5Type/tests/ERP5TypeTestCase.py
+++ b/product/ERP5Type/tests/ERP5TypeTestCase.py
@@ -667,6 +667,10 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
 
         return ResponseWrapper(response, outstream, path)
 
+    def getConsistencyMessageList(self, obj):
+        return sorted([ str(message.getMessage())
+                        for message in obj.checkConsistency() ])
+
 class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
 
     def getPortalName(self):
-- 
2.30.9