summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2014-01-08 16:14:48 +0100
committerMichal Minar <miminar@redhat.com>2014-01-08 16:18:52 +0100
commitac94d901a2a1b9fc8683b44adeec2d3d6f9fa5bb (patch)
tree1f4acbcfdec2ad17710eb9f1386aae169861bc73 /src/software
parent73091488aceebd8e49483fa24270688903797080 (diff)
downloadopenlmi-providers-ac94d901a2a1b9fc8683b44adeec2d3d6f9fa5bb.tar.gz
openlmi-providers-ac94d901a2a1b9fc8683b44adeec2d3d6f9fa5bb.tar.xz
openlmi-providers-ac94d901a2a1b9fc8683b44adeec2d3d6f9fa5bb.zip
tests: ensure the use of exceptions is well defined
Some tests expect that exceptions won't be thrown out of LMIShell's functions. Others prefers them and enable them globally. This causes problems when running under nosetests all provider tests at once. Tests that modified enablement of exception throws globally caused others to fail. This patch makes sure that each TestCase has defined use of exceptions. Default state is to have them disabled. If a TestCase prefers having them enabled, just one variable needs to be overriden in its body: class AccountBase(lmibase.LmiTestCase): USE_EXCEPTIONS = True
Diffstat (limited to 'src/software')
-rw-r--r--src/software/test/swbase.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/software/test/swbase.py b/src/software/test/swbase.py
index 7c2de1e..8b8580b 100644
--- a/src/software/test/swbase.py
+++ b/src/software/test/swbase.py
@@ -280,4 +280,5 @@ class SwTestCase(LmiTestCase):
os.remove(os.environ['LMI_SOFTWARE_DB_CACHE'])
cls.repodb.clear()
SwTestCase.TEST_CASES_INSTANTIATED -= 1
+ LmiTestCase.tearDownClass.im_func(cls)