diff options
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestOptions')
-rw-r--r-- | testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py | 4 | ||||
-rw-r--r-- | testsuite/Testsrc/Testlib/TestOptions/__init__.py | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py b/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py index aee2ff666..78acadf1f 100644 --- a/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py +++ b/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py @@ -2,9 +2,10 @@ import argparse +import mock + from Bcfg2.Options import Option, PathOption, ConfigFileAction, get_parser, \ new_parser - from testsuite.Testsrc.Testlib.TestOptions import make_config, OptionTestCase @@ -43,6 +44,7 @@ class TestConfigFiles(OptionTestCase): inner1() + @mock.patch("os.path.exists", mock.Mock(return_value=False)) def test_no_config_file(self): """fail to read config file.""" self.assertRaises(SystemExit, self.parser.parse, []) diff --git a/testsuite/Testsrc/Testlib/TestOptions/__init__.py b/testsuite/Testsrc/Testlib/TestOptions/__init__.py index b051f65e5..00e250356 100644 --- a/testsuite/Testsrc/Testlib/TestOptions/__init__.py +++ b/testsuite/Testsrc/Testlib/TestOptions/__init__.py @@ -77,9 +77,3 @@ class OptionTestCase(Bcfg2TestCase): @classmethod def tearDownClass(cls): Parser.unit_test = True - - - -# TODO: -# * subcommands -# * common options |