diff --git a/product/ERP5OOo/tests/testFormPrintoutAsODG.py b/product/ERP5OOo/tests/testFormPrintoutAsODG.py
index 88c782f0439bee3eb80e7278ca52b7ec0e6c2c4c..849035f13be389f6da5600f2941bb1e2765117b9 100644
--- a/product/ERP5OOo/tests/testFormPrintoutAsODG.py
+++ b/product/ERP5OOo/tests/testFormPrintoutAsODG.py
@@ -193,12 +193,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
     self.assertTrue(foo_printout.template == 'Foo_getODGStyleSheet')
     tmp_template = foo_printout.template
     foo_printout.template = None
-    # template == None, causes a ValueError
-    try:
-      foo_printout.index_html(request)
-    except ValueError, e:
-      # e -> 'Can not create a ODF Document without a odf_template'
-      self.assertTrue(True)
+    self.assertRaises(ValueError, foo_printout.index_html, request)
 
     # put back
     foo_printout.template = tmp_template
@@ -444,13 +439,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
     self.assertTrue(foo_printout.template == 'Foo_getODGStyleSheet')
     tmp_template = foo_printout.template
     foo_printout.template = None
-    # template == None, causes a ValueError
-    try:
-      foo_printout.index_html(REQUEST=request)
-    except ValueError, e:
-      # e -> 'Can not create a ODF Document without a odf_template'
-      self.assertTrue(True)
-
+    self.assertRaises(ValueError, foo_printout.index_html, request)
     # put back
     foo_printout.template = tmp_template
 
diff --git a/product/ERP5OOo/tests/testFormPrintoutAsODT.py b/product/ERP5OOo/tests/testFormPrintoutAsODT.py
index 4374811a889a52ac3c73365fc82e15af15d41dd8..ed6d64a54e3dbb73c8a0c9a30be41c34d259b2a3 100644
--- a/product/ERP5OOo/tests/testFormPrintoutAsODT.py
+++ b/product/ERP5OOo/tests/testFormPrintoutAsODT.py
@@ -189,13 +189,7 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
     self.assertTrue(foo_printout.template == 'Foo_getODTStyleSheet')
     tmp_template = foo_printout.template
     foo_printout.template = None
-    # template == None, causes a ValueError
-    try:
-      foo_printout.index_html(REQUEST=request)
-    except ValueError, e:
-      # e -> 'Can not create a ODF Document without a odf_template'
-      self.assertTrue(True)
-
+    self.assertRaises(ValueError, foo_printout.index_html, request)
     # put back
     foo_printout.template = tmp_template