summaryrefslogtreecommitdiffstats
path: root/testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py')
-rw-r--r--testsuite/Testsrc/Testlib/TestOptions/TestConfigFiles.py4
1 files changed, 3 insertions, 1 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, [])