From 836e995a7ab50c838ebff190f371b493d905a31c Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 13 Aug 2012 15:02:46 -0400 Subject: abstracted out some common test stuff into common.py --- testsuite/Testlib/TestOptions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testsuite/Testlib/TestOptions.py') diff --git a/testsuite/Testlib/TestOptions.py b/testsuite/Testlib/TestOptions.py index 2129b9287..4c87b2f42 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, @@ -68,7 +68,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 +108,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')), -- cgit v1.2.3-1-g7c22 From e911b57eb38dfa0fc06d19e70e02e121ae721e57 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 15 Aug 2012 08:21:19 -0400 Subject: print function fixes --- testsuite/Testlib/TestOptions.py | 1 - 1 file changed, 1 deletion(-) (limited to 'testsuite/Testlib/TestOptions.py') diff --git a/testsuite/Testlib/TestOptions.py b/testsuite/Testlib/TestOptions.py index 4c87b2f42..e3bba787d 100644 --- a/testsuite/Testlib/TestOptions.py +++ b/testsuite/Testlib/TestOptions.py @@ -30,7 +30,6 @@ class TestOption(Bcfg2TestCase): 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') -- cgit v1.2.3-1-g7c22