Commit bc29563a authored by Nicolas Delaby's avatar Nicolas Delaby

Really check that exception is raised.

reviewed by jerome


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32072 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6d9002ec
No related merge requests found
......@@ -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
......
......@@ -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
......
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