diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-08-03 14:08:22 -0700 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-08-03 14:08:22 -0700 |
| commit | 4f9f56d8e9917f5db0c5f76653d7ee3a2db52a5f (patch) | |
| tree | aa25a4db696f474010a5e8fc10dd616169d220bc | |
| parent | ff5dbc6d985d11ef937baa930ee96c93cbd8ccf9 (diff) | |
fix scheduler tests that set FLAGS
| -rw-r--r-- | nova/tests/scheduler/test_scheduler.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nova/tests/scheduler/test_scheduler.py b/nova/tests/scheduler/test_scheduler.py index 6a56a57db..f60eb6433 100644 --- a/nova/tests/scheduler/test_scheduler.py +++ b/nova/tests/scheduler/test_scheduler.py @@ -962,13 +962,10 @@ class ZoneRedirectTest(test.TestCase): self.stubs.Set(db, 'zone_get_all', zone_get_all) self.stubs.Set(db, 'instance_get_by_uuid', fake_instance_get_by_uuid) - - self.enable_zone_routing = FLAGS.enable_zone_routing - FLAGS.enable_zone_routing = True + self.flags(enable_zone_routing=True) def tearDown(self): self.stubs.UnsetAll() - FLAGS.enable_zone_routing = self.enable_zone_routing super(ZoneRedirectTest, self).tearDown() def test_trap_found_locally(self): @@ -998,7 +995,7 @@ class ZoneRedirectTest(test.TestCase): self.assertEquals(e.results['magic'], 'found me') def test_routing_flags(self): - FLAGS.enable_zone_routing = False + self.flags(enable_zone_routing=False) decorator = FakeRerouteCompute("foo") self.assertRaises(exception.InstanceNotFound, decorator(go_boom), None, None, 1) |
