summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestServer/TestPlugin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-24 14:51:36 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-25 11:58:48 -0400
commit3f16355e18cdceb37828a00a8181d9cc60815cd0 (patch)
treee2b38114e0a06d3c7b28ad4ef5c15793e21eb2b3 /testsuite/Testsrc/Testlib/TestServer/TestPlugin
parent47aebb16f15fe6f8ce29d8c6b105f10d8d64c295 (diff)
downloadbcfg2-3f16355e18cdceb37828a00a8181d9cc60815cd0.tar.gz
bcfg2-3f16355e18cdceb37828a00a8181d9cc60815cd0.tar.bz2
bcfg2-3f16355e18cdceb37828a00a8181d9cc60815cd0.zip
fixed tests for pylint changes
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugin')
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py6
-rw-r--r--testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
index aea00c356..f555d15f1 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
@@ -81,7 +81,7 @@ class TestFunctions(Bcfg2TestCase):
class TestDatabaseBacked(TestPlugin):
test_obj = DatabaseBacked
- @skipUnless(has_django, "Django not found")
+ @skipUnless(HAS_DJANGO, "Django not found")
def test__use_db(self):
core = Mock()
core.setup.cfp.getboolean.return_value = True
@@ -93,7 +93,7 @@ class TestDatabaseBacked(TestPlugin):
db = self.get_obj(core)
self.assertFalse(db._use_db)
- Bcfg2.Server.Plugin.helpers.has_django = False
+ Bcfg2.Server.Plugin.helpers.HAS_DJANGO = False
core = Mock()
db = self.get_obj(core)
self.assertFalse(db._use_db)
@@ -102,7 +102,7 @@ class TestDatabaseBacked(TestPlugin):
core.setup.cfp.getboolean.return_value = True
db = self.get_obj(core)
self.assertFalse(db._use_db)
- Bcfg2.Server.Plugin.helpers.has_django = True
+ Bcfg2.Server.Plugin.helpers.HAS_DJANGO = True
class TestPluginDatabaseModel(Bcfg2TestCase):
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
index 1c0af33eb..f05795b1a 100644
--- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
+++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testinterfaces.py
@@ -129,7 +129,7 @@ class TestThreadedStatistics(TestStatistics):
queue.empty = Mock(side_effect=Empty)
ts.work_queue = queue
- mock_open.side_effect = OSError
+ mock_open.side_effect = IOError
# test that save does _not_ raise an exception even when
# everything goes pear-shaped
ts._save()
@@ -188,7 +188,7 @@ class TestThreadedStatistics(TestStatistics):
reset()
mock_exists.return_value = True
- mock_open.side_effect = OSError
+ mock_open.side_effect = IOError
self.assertFalse(ts._load())
mock_exists.assert_called_with(ts.pending_file)
mock_open.assert_called_with(ts.pending_file, 'r')
@@ -330,7 +330,7 @@ class TestVersion(Bcfg2TestCase):
test_obj = Version
def get_obj(self):
- return self.test_obj()
+ return self.test_obj(datastore)
def test_get_revision(self):
d = self.get_obj()