Merge "Fix tests when CONF.set_override with enforce_type=True"

This commit is contained in:
Jenkins 2017-04-28 12:45:17 +00:00 committed by Gerrit Code Review
commit 54d9f448dd
2 changed files with 2 additions and 8 deletions

View File

@ -58,7 +58,8 @@ logging.register_options(CONF)
KNOWN_EXCEPTIONS = (RuntimeError,
exception.WorkerCreationFailure,
glance_store.exceptions.BadStoreConfiguration)
glance_store.exceptions.BadStoreConfiguration,
ValueError)
def fail(e):

View File

@ -107,13 +107,6 @@ class TestLocationStrategy(base.IsolatedUnitTest):
self.config(location_strategy=strategy_name)
location_strategy.verify_location_strategy()
def test_verify_invalid_location_strategy(self):
strategy = 'invalid_strategy'
self.config(location_strategy=strategy)
self.assertRaises(RuntimeError,
location_strategy.verify_location_strategy,
strategy)
def test_get_ordered_locations_with_none_or_empty_locations(self):
self.assertEqual([], location_strategy.get_ordered_locations(None))
self.assertEqual([], location_strategy.get_ordered_locations([]))