diff options
| author | Brian Waldon <bcwaldon@gmail.com> | 2012-01-20 17:02:19 -0800 |
|---|---|---|
| committer | Brian Waldon <bcwaldon@gmail.com> | 2012-01-20 17:02:19 -0800 |
| commit | d7448fc86a929226a34e92ef77684441f451edaf (patch) | |
| tree | 371ee4b50e988eb4a32503ccdc886c84f4f8cc10 /nova/tests | |
| parent | 1bf066c59bbfe40a30e498f2b24fdddd82fb2508 (diff) | |
Handle FlavorNotFound on server list w/ filter
Fix bug 919426
Change-Id: I1f450fd7ed28837b664aa81f4dd833e3433cd126
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_compute.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index 992b1076f..421a0ef89 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -2469,9 +2469,9 @@ class ComputeAPITestCase(BaseTestCase): search_opts={'flavor': 5}) self.assertEqual(len(instances), 0) - self.assertRaises(exception.FlavorNotFound, - self.compute_api.get_all, - c, search_opts={'flavor': 99}) + # 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, []) instances = self.compute_api.get_all(c, search_opts={'flavor': 3}) self.assertEqual(len(instances), 1) |
