diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-11-21 05:11:42 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-11-21 05:11:42 +0000 |
| commit | cf26ec71a6d4e114b11d1b7b6ddc007f93a9564f (patch) | |
| tree | 9f40f2a5430de65701fa743fe5ab09b9e153da87 /nova/tests | |
| parent | 210afea928bbbda2fe2fb575c76623b9d04e203e (diff) | |
| parent | a19d64808f3c4ab1cc3306ac3678701d0fff3e87 (diff) | |
Merge "Return an error response if the specified flavor does not exists. (v4)"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/compute/test_compute.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 3ee294272..264566d7a 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -4254,9 +4254,10 @@ class ComputeAPITestCase(BaseTestCase): search_opts={'flavor': 5}) self.assertEqual(len(instances), 0) - # ensure unknown filter maps to an empty list, not an exception - instances = self.compute_api.get_all(c, search_opts={'flavor': 99}) - self.assertEqual(instances, []) + # ensure unknown filter maps to an exception + self.assertRaises(exception.FlavorNotFound, + self.compute_api.get_all, c, + search_opts={'flavor': 99}) instances = self.compute_api.get_all(c, search_opts={'flavor': 3}) self.assertEqual(len(instances), 1) |
