Commit 6b2906e1 authored by Nicolas Dumazet's avatar Nicolas Dumazet

enclose asserts in a try/finally to make sure that even after an error,

the bt will be uninstalled. This makes sure that test_type_provider_2 is
not contaminated after a failure of test_type_provider


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39497 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0f838ca1
......@@ -6842,7 +6842,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
self.stepTic()
new_bt.install()
try:
type_provider = self.portal._getOb('dummy_type_provider', None)
self.assertNotEqual(None, type_provider)
......@@ -6879,6 +6879,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
instance.setSourceReference('OK')
self.assertEquals('OK', instance.getSourceReference())
finally:
new_bt.uninstall()
self.assertNotEquals(None, types_tool.getTypeInfo('Base Category'))
self.assertEquals(None, types_tool.getTypeInfo('Dummy Type'))
......
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