From 027ca41a8f7b919f378835e94917bcb6e22b0120 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 20 Dec 2012 11:43:47 +0100
Subject: [PATCH] display body if return code is not 200

---
 product/ERP5OOo/tests/testOOoDynamicStyle.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/product/ERP5OOo/tests/testOOoDynamicStyle.py b/product/ERP5OOo/tests/testOOoDynamicStyle.py
index e0b38fe04a..35994d809d 100644
--- a/product/ERP5OOo/tests/testOOoDynamicStyle.py
+++ b/product/ERP5OOo/tests/testOOoDynamicStyle.py
@@ -233,14 +233,16 @@ return getattr(context, "%s_%s" % (parameter, current_language))
     Base_viewIncludeImageAsOdt.pt_edit(custom_content,
         content_type='application/vnd.oasis.opendocument.text')
     self.tic()
+
     response = self.publish('/' + self.getPortal().Base_viewIncludeImageAsOdt.absolute_url(1))
+    body = response.getBody()
+    self.assertTrue(200, response.getStatus(), body)
     self.assertEqual('application/vnd.oasis.opendocument.text',
                      response.getHeader('content-type').split(';')[0])
     self.assertEqual('attachment; filename="Base_viewIncludeImageAsOdt.odt"',
                      response.getHeader('content-disposition'))
-    self.assertTrue(200, response.getStatus())
     cs = StringIO()
-    cs.write(response.getBody())
+    cs.write(body)
     zip_document = ZipFile(cs)
     picture_list = filter(lambda x: "Pictures" in x.filename,
         zip_document.infolist())
-- 
2.30.9