diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-01-21 22:58:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-01-21 22:58:45 +0000 |
| commit | 0f2dc94e9894649e3ff64dc3f8dd333930afe643 (patch) | |
| tree | 3c41d72087b35f8ac912484fda538c0221e502a6 /nova/tests | |
| parent | 9ebcd1d91c7efe9db1192226389cd8396f1bee8e (diff) | |
| parent | 3a92a9efe90f7b186653d89b45d5468fc0b0543f (diff) | |
Merge "Remove restoring soft deleted entries part 1"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_instance_types_extra_specs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/tests/test_instance_types_extra_specs.py b/nova/tests/test_instance_types_extra_specs.py index f53840b86..f48c2efe8 100644 --- a/nova/tests/test_instance_types_extra_specs.py +++ b/nova/tests/test_instance_types_extra_specs.py @@ -18,6 +18,7 @@ Unit Tests for instance types extra specs code from nova import context from nova import db +from nova import exception from nova import test @@ -87,6 +88,13 @@ class InstanceTypeExtraSpecsTestCase(test.TestCase): self.flavorid) self.assertEquals(expected_specs, actual_specs) + def test_instance_type_extra_specs_update_with_nonexisting_flavor(self): + extra_specs = dict(cpu_arch="x86_64") + nonexisting_flavorid = "some_flavor_that_doesnt_exists" + self.assertRaises(exception.FlavorNotFound, + db.instance_type_extra_specs_update_or_create, + self.context, nonexisting_flavorid, extra_specs) + def test_instance_type_extra_specs_create(self): expected_specs = dict(cpu_arch="x86_64", cpu_model="Nehalem", |
