diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-15 08:21:45 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-15 08:21:45 -0400 |
commit | b455dafd90b9710020f798cd73d63cd049685695 (patch) | |
tree | 0456007832aa19bc5d8bea84cbb647492926c7e2 /testsuite/Testlib/TestOptions.py | |
parent | 06a2efea2f666b94eaf7e74bda798ed261fc47de (diff) | |
parent | e911b57eb38dfa0fc06d19e70e02e121ae721e57 (diff) | |
download | bcfg2-b455dafd90b9710020f798cd73d63cd049685695.tar.gz bcfg2-b455dafd90b9710020f798cd73d63cd049685695.tar.bz2 bcfg2-b455dafd90b9710020f798cd73d63cd049685695.zip |
Merge branch 'tests'
Diffstat (limited to 'testsuite/Testlib/TestOptions.py')
-rw-r--r-- | testsuite/Testlib/TestOptions.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/testsuite/Testlib/TestOptions.py b/testsuite/Testlib/TestOptions.py index 2129b9287..e3bba787d 100644 --- a/testsuite/Testlib/TestOptions.py +++ b/testsuite/Testlib/TestOptions.py @@ -3,9 +3,9 @@ import sys import unittest from mock import Mock, patch import Bcfg2.Options +from ..common import * - -class TestOption(unittest.TestCase): +class TestOption(Bcfg2TestCase): def test__init(self): self.assertRaises(Bcfg2.Options.OptionFailure, Bcfg2.Options.Option, @@ -30,7 +30,6 @@ class TestOption(unittest.TestCase): c.get('foo', False, cmd='-f') mock_cp.assert_any_call() mock_open.assert_any_call(Bcfg2.Options.DEFAULT_CONFIG_LOCATION) - print(mock_cp.return_value.get.called) self.assertTrue(mock_cp.return_value.get.called) @patch('Bcfg2.Options.DefaultConfigParser') @@ -68,7 +67,7 @@ class TestOption(unittest.TestCase): assert o2.value == True -class TestOptionSet(unittest.TestCase): +class TestOptionSet(Bcfg2TestCase): def test_buildGetopt(self): opts = [('foo', Bcfg2.Options.Option('foo', 'test1', cmd='-G')), ('bar', Bcfg2.Options.Option('foo', 'test2')), @@ -108,7 +107,7 @@ class TestOptionSet(unittest.TestCase): self.assertTrue(oset3['foo']) -class TestOptionParser(unittest.TestCase): +class TestOptionParser(Bcfg2TestCase): def test__init(self): opts = [('foo', Bcfg2.Options.Option('foo', 'test1', cmd='-h')), ('bar', Bcfg2.Options.Option('foo', 'test2')), |