summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-11-25 12:55:50 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-11-25 12:55:50 -0500
commit1c7488e85200e50429b1248d36a6815bedc49f02 (patch)
treec8d32186a4bcc3f436df5a2dee536de934085fe7 /testsuite
parent16b4744544ab140c4ab9bc733a7dfa76cf4e578c (diff)
downloadbcfg2-1c7488e85200e50429b1248d36a6815bedc49f02.tar.gz
bcfg2-1c7488e85200e50429b1248d36a6815bedc49f02.tar.bz2
bcfg2-1c7488e85200e50429b1248d36a6815bedc49f02.zip
testsuite: fixed unit tests for database fixes
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
index 5ae0dfcba..eac4faf90 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
@@ -7,6 +7,7 @@ import Bcfg2.Server
from Bcfg2.Compat import reduce
from mock import Mock, MagicMock, patch
from Bcfg2.Server.Plugin.helpers import *
+from Bcfg2.Server.Plugin.exceptions import PluginInitError
# add all parent testsuite directories to sys.path to allow (most)
# relative imports in python 2.4
@@ -90,13 +91,13 @@ class TestDatabaseBacked(TestPlugin):
Bcfg2.Server.Plugin.helpers.HAS_DJANGO = False
core = Mock()
+ core.setup.cfp.getboolean.return_value = False
db = self.get_obj(core)
self.assertFalse(db._use_db)
core = Mock()
core.setup.cfp.getboolean.return_value = True
- db = self.get_obj(core)
- self.assertFalse(db._use_db)
+ self.assertRaises(PluginInitError, self.get_obj, core)
Bcfg2.Server.Plugin.helpers.HAS_DJANGO = True