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
...@@ -193,12 +193,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin): ...@@ -193,12 +193,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
self.assertTrue(foo_printout.template == 'Foo_getODGStyleSheet') self.assertTrue(foo_printout.template == 'Foo_getODGStyleSheet')
tmp_template = foo_printout.template tmp_template = foo_printout.template
foo_printout.template = None foo_printout.template = None
# template == None, causes a ValueError self.assertRaises(ValueError, foo_printout.index_html, request)
try:
foo_printout.index_html(request)
except ValueError, e:
# e -> 'Can not create a ODF Document without a odf_template'
self.assertTrue(True)
# put back # put back
foo_printout.template = tmp_template foo_printout.template = tmp_template
...@@ -444,13 +439,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin): ...@@ -444,13 +439,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
self.assertTrue(foo_printout.template == 'Foo_getODGStyleSheet') self.assertTrue(foo_printout.template == 'Foo_getODGStyleSheet')
tmp_template = foo_printout.template tmp_template = foo_printout.template
foo_printout.template = None foo_printout.template = None
# template == None, causes a ValueError self.assertRaises(ValueError, foo_printout.index_html, request)
try:
foo_printout.index_html(REQUEST=request)
except ValueError, e:
# e -> 'Can not create a ODF Document without a odf_template'
self.assertTrue(True)
# put back # put back
foo_printout.template = tmp_template foo_printout.template = tmp_template
......
...@@ -189,13 +189,7 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin): ...@@ -189,13 +189,7 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
self.assertTrue(foo_printout.template == 'Foo_getODTStyleSheet') self.assertTrue(foo_printout.template == 'Foo_getODTStyleSheet')
tmp_template = foo_printout.template tmp_template = foo_printout.template
foo_printout.template = None foo_printout.template = None
# template == None, causes a ValueError self.assertRaises(ValueError, foo_printout.index_html, request)
try:
foo_printout.index_html(REQUEST=request)
except ValueError, e:
# e -> 'Can not create a ODF Document without a odf_template'
self.assertTrue(True)
# put back # put back
foo_printout.template = tmp_template 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