diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2014-11-10 19:55:53 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2014-11-10 19:55:53 +0100 |
commit | 3f32d999c6e75af57058e389a07d1ab6a62eaebb (patch) | |
tree | 6055de1e6a541e2e5e4a721058f414a0e50258b6 /testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py | |
parent | da93fb540c28be3341ec0d37d1fbd90153fb750c (diff) | |
parent | 0e133c157755908d05c44c3a36b1dc0668e1d111 (diff) | |
download | bcfg2-3f32d999c6e75af57058e389a07d1ab6a62eaebb.tar.gz bcfg2-3f32d999c6e75af57058e389a07d1ab6a62eaebb.tar.bz2 bcfg2-3f32d999c6e75af57058e389a07d1ab6a62eaebb.zip |
Merge branch 'options-unit-tests' of https://github.com/stpierre/bcfg2
* 'options-unit-tests' of https://github.com/stpierre/bcfg2:
Options: Fixed non-path database name parsing
Options: further command registry fixes
Options: gather as much data from config file first
Options: fix path canonicalization and file-like objects
testsuite: unlink temporary files
Options: ensure <repository> macros are always fixed up
DBSettings: fix up <repository> in database name
testsuite: better debug capturing for options tests
call shutdown on subcommand registries
fixed some places where plugin loading should fail silently
testsuite: Added unit tests for new option parsing
testsuite: capture stderr by default
Test failure to parse config file when bcfg2.conf exists
testsuite: skip nested exclusive option group test on py2.6
testsuite: Added unit tests for new option parsing
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py')
-rw-r--r-- | testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py | 20 |
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 740b90251..654e792b8 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): |