diff options
author | Michal Minar <miminar@redhat.com> | 2014-01-08 16:14:48 +0100 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2014-01-08 16:18:52 +0100 |
commit | ac94d901a2a1b9fc8683b44adeec2d3d6f9fa5bb (patch) | |
tree | 1f4acbcfdec2ad17710eb9f1386aae169861bc73 /src/journald | |
parent | 73091488aceebd8e49483fa24270688903797080 (diff) | |
download | openlmi-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/journald')
-rw-r--r-- | src/journald/test/journald_common.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/journald/test/journald_common.py b/src/journald/test/journald_common.py index 60ce15e..bf89595 100644 --- a/src/journald/test/journald_common.py +++ b/src/journald/test/journald_common.py @@ -22,14 +22,11 @@ Base class and utilities for Journald tests. """ from lmi.test import lmibase -import lmi.shell class JournalBase(lmibase.LmiTestCase): """ Base class for all LMI Journal tests """ - @classmethod - def setUpClass(cls): - lmibase.LmiTestCase.setUpClass.im_func(cls) - lmi.shell.LMIUtil.lmi_set_use_exceptions(True) + USE_EXCEPTIONS = True + |