summaryrefslogtreecommitdiffstats
path: root/src/account
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/account
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/account')
-rw-r--r--src/account/test/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/account/test/common.py b/src/account/test/common.py
index 8bb18e2..1476d10 100644
--- a/src/account/test/common.py
+++ b/src/account/test/common.py
@@ -24,17 +24,17 @@ Base class and utilities for all OpenLMI Account tests.
import os
from lmi.test import lmibase
-import lmi.shell
class AccountBase(lmibase.LmiTestCase):
"""
Base class for all LMI Account tests.
"""
+ USE_EXCEPTIONS = True
+
@classmethod
def setUpClass(cls):
lmibase.LmiTestCase.setUpClass.im_func(cls)
- lmi.shell.LMIUtil.lmi_set_use_exceptions(True)
cls.user_name = os.environ.get("LMI_ACCOUNT_USER")
cls.group_name = os.environ.get("LMI_ACCOUNT_GROUP")