remove set_flags_verbosity.. it's not needed

This commit is contained in:
Chris Behrens 2011-08-04 12:07:07 -07:00
parent dcc4cd0520
commit 7f35b6ee93
8 changed files with 7 additions and 15 deletions

View File

@ -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

View File

@ -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',

View File

@ -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)

View File

@ -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 = {}

View File

@ -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)

View File

@ -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',

View File

@ -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)

View File

@ -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])