From 7f35b6ee93ea2192a8c81a7c17e2e74694a397a1 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Thu, 4 Aug 2011 12:07:07 -0700 Subject: [PATCH] remove set_flags_verbosity.. it's not needed --- nova/test.py | 5 ----- nova/tests/api/openstack/test_accounts.py | 3 +-- nova/tests/api/openstack/test_adminapi.py | 2 +- nova/tests/api/openstack/test_server_actions.py | 2 +- nova/tests/api/openstack/test_servers.py | 2 +- nova/tests/api/openstack/test_users.py | 3 +-- nova/tests/api/openstack/test_zones.py | 3 +-- nova/tests/integrated/integrated_helpers.py | 2 +- 8 files changed, 7 insertions(+), 15 deletions(-) diff --git a/nova/test.py b/nova/test.py index fa5a662fd012..ff85deeda1a9 100644 --- a/nova/test.py +++ b/nova/test.py @@ -156,11 +156,6 @@ class TestCase(unittest.TestCase): FLAGS.Reset() for k, v in self._original_flags.iteritems(): setattr(FLAGS, k, v) - FLAGS.verbose = self._original_flags_verbosity - - def set_flags_verbosity(self, verbose=True): - """Set the FLAGS verbosity for a test""" - FLAGS.verbose = verbose def start_service(self, name, host=None, **kwargs): host = host and host or uuid.uuid4().hex diff --git a/nova/tests/api/openstack/test_accounts.py b/nova/tests/api/openstack/test_accounts.py index b1ca546d222d..707a2599fef4 100644 --- a/nova/tests/api/openstack/test_accounts.py +++ b/nova/tests/api/openstack/test_accounts.py @@ -35,8 +35,7 @@ def fake_admin_check(self, req): class AccountsTest(test.TestCase): def setUp(self): super(AccountsTest, self).setUp() - self.flags(allow_admin_api=True) - self.set_flags_verbosity(True) + self.flags(verbose=True, allow_admin_api=True) self.stubs.Set(accounts.Controller, '__init__', fake_init) self.stubs.Set(accounts.Controller, '_check_admin', diff --git a/nova/tests/api/openstack/test_adminapi.py b/nova/tests/api/openstack/test_adminapi.py index 9d03a7f9da56..c9e66dc4cb5d 100644 --- a/nova/tests/api/openstack/test_adminapi.py +++ b/nova/tests/api/openstack/test_adminapi.py @@ -28,7 +28,7 @@ class AdminAPITest(test.TestCase): super(AdminAPITest, self).setUp() fakes.stub_out_networking(self.stubs) fakes.stub_out_rate_limiting(self.stubs) - self.set_flags_verbosity(True) + self.flags(verbose=True) def test_admin_enabled(self): self.flags(allow_admin_api=True) diff --git a/nova/tests/api/openstack/test_server_actions.py b/nova/tests/api/openstack/test_server_actions.py index baec5f3d1015..562cefe90f06 100644 --- a/nova/tests/api/openstack/test_server_actions.py +++ b/nova/tests/api/openstack/test_server_actions.py @@ -97,7 +97,7 @@ class ServerActionsTest(test.TestCase): def setUp(self): self.maxDiff = None super(ServerActionsTest, self).setUp() - self.set_flags_verbosity(True) + self.flags(verbose=True) self.stubs = stubout.StubOutForTesting() fakes.FakeAuthManager.reset_fake_data() fakes.FakeAuthDatabase.data = {} diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py index bb411af10165..0477f6d92b1c 100644 --- a/nova/tests/api/openstack/test_servers.py +++ b/nova/tests/api/openstack/test_servers.py @@ -230,7 +230,7 @@ class ServersTest(test.TestCase): def setUp(self): self.maxDiff = None super(ServersTest, self).setUp() - self.set_flags_verbosity(True) + self.flags(verbose=True) fakes.stub_out_networking(self.stubs) fakes.stub_out_rate_limiting(self.stubs) fakes.stub_out_key_pair_funcs(self.stubs) diff --git a/nova/tests/api/openstack/test_users.py b/nova/tests/api/openstack/test_users.py index 649538f1183e..1d133f9ab3b2 100644 --- a/nova/tests/api/openstack/test_users.py +++ b/nova/tests/api/openstack/test_users.py @@ -35,8 +35,7 @@ def fake_admin_check(self, req): class UsersTest(test.TestCase): def setUp(self): super(UsersTest, self).setUp() - self.flags(allow_admin_api=True) - self.set_flags_verbosity(True) + self.flags(verbose=True, allow_admin_api=True) self.stubs.Set(users.Controller, '__init__', fake_init) self.stubs.Set(users.Controller, '_check_admin', diff --git a/nova/tests/api/openstack/test_zones.py b/nova/tests/api/openstack/test_zones.py index 442ee431332b..4a46a57649a9 100644 --- a/nova/tests/api/openstack/test_zones.py +++ b/nova/tests/api/openstack/test_zones.py @@ -94,8 +94,7 @@ def zone_select(context, specs): class ZonesTest(test.TestCase): def setUp(self): super(ZonesTest, self).setUp() - self.flags(allow_admin_api=True) - self.set_flags_verbosity(True) + self.flags(verbose=True, allow_admin_api=True) fakes.stub_out_networking(self.stubs) fakes.stub_out_rate_limiting(self.stubs) diff --git a/nova/tests/integrated/integrated_helpers.py b/nova/tests/integrated/integrated_helpers.py index 049ddbc60750..fb2f88502c18 100644 --- a/nova/tests/integrated/integrated_helpers.py +++ b/nova/tests/integrated/integrated_helpers.py @@ -148,7 +148,7 @@ class _IntegratedTestBase(test.TestCase): f = self._get_flags() self.flags(**f) - self.set_flags_verbosity(True) + self.flags(verbose=True) def fake_get_image_service(image_href): image_id = int(str(image_href).split('/')[-1])