summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2014-11-11 14:50:22 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2014-11-11 14:50:22 -0600
commit77cf4a56b3b7ff8cd466705b968abb539efa703f (patch)
tree9769d560cce0dacda0360dfc434f33774cb01f5e /testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py
parent389ce1a86b704222ddc9458cd49c281e7601b803 (diff)
parent30634d07d5489f260f37cc86d150315f02c40865 (diff)
downloadbcfg2-77cf4a56b3b7ff8cd466705b968abb539efa703f.tar.gz
bcfg2-77cf4a56b3b7ff8cd466705b968abb539efa703f.tar.bz2
bcfg2-77cf4a56b3b7ff8cd466705b968abb539efa703f.zip
Merge pull request #211 from stpierre/options-unit-tests
Options unit tests
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py')
-rw-r--r--testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py
index 0e9e3a141..047905fc3 100644
--- a/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py
+++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py
@@ -17,18 +17,18 @@ while path != "/":
path = os.path.dirname(path)
from common import *
-# try to find true
-if os.path.exists("/bin/true"):
- TRUE = "/bin/true"
-elif os.path.exists("/usr/bin/true"):
- TRUE = "/usr/bin/true"
-else:
- TRUE = None
-
class TestTool(Bcfg2TestCase):
test_obj = Tool
+ # try to find true
+ if os.path.exists("/bin/true"):
+ true = "/bin/true"
+ elif os.path.exists("/usr/bin/true"):
+ true = "/usr/bin/true"
+ else:
+ true = None
+
def setUp(self):
set_setup_default('command_timeout')
set_setup_default('interactive', False)
@@ -77,11 +77,11 @@ class TestTool(Bcfg2TestCase):
["/test"] + [e.get("name") for e in important])
t.getSupportedEntries.assert_called_with()
- @skipIf(TRUE is None, "/bin/true or equivalent not found")
+ @skipIf(true is None, "/bin/true or equivalent not found")
def test__check_execs(self):
t = self.get_obj()
if t.__execs__ == []:
- t.__execs__.append(TRUE)
+ t.__execs__.append(self.true)
@patch("os.stat")
def inner(mock_stat):