summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-05-21 20:52:26 +0100
committerMark McLoughlin <markmc@redhat.com>2012-05-21 21:18:26 +0100
commitc1bf456cca88652efef8468e673b12acceea5665 (patch)
tree8de1e43d5a1f5b697cf8bbf8a76ab53afac4a661 /nova/tests
parent53583faac261f2272f81da2ee2efaff0e10bc400 (diff)
Sync with latest version of openstack.common.cfg
Changes since last sync: - Alphabetize imports in openstack/common/cfg.py - make reset() clear defaults and overrides - automatically create option groups - allow options to be marked as required - use a list comprehension instead of map() Change-Id: I74fac3f66b37ee07bab53bd655c0297f25849979
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_flags.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/tests/test_flags.py b/nova/tests/test_flags.py
index c980e522a..925de1f5f 100644
--- a/nova/tests/test_flags.py
+++ b/nova/tests/test_flags.py
@@ -36,6 +36,7 @@ class FlagsTestCase(test.TestCase):
super(FlagsTestCase, self).setUp()
self.FLAGS = flags.NovaConfigOpts()
self.global_FLAGS = flags.FLAGS
+ self.flags(config_file=[])
def test_declare(self):
self.assert_('answer' not in self.global_FLAGS)
@@ -64,7 +65,7 @@ class FlagsTestCase(test.TestCase):
self.assertEqual(self.global_FLAGS.runtime_answer, 54)
def test_long_vs_short_flags(self):
- self.global_FLAGS.reset()
+ self.global_FLAGS.clear()
self.global_FLAGS.register_cli_opt(cfg.StrOpt('duplicate_answer_long',
default='val',
help='desc'))
@@ -74,7 +75,7 @@ class FlagsTestCase(test.TestCase):
self.assert_('duplicate_answer' not in self.global_FLAGS)
self.assert_(self.global_FLAGS.duplicate_answer_long, 60)
- self.global_FLAGS.reset()
+ self.global_FLAGS.clear()
self.global_FLAGS.register_cli_opt(cfg.IntOpt('duplicate_answer',
default=60,
help='desc'))