diff options
| author | Phlip Knouff <philip.knouff@mailtrust.com> | 2012-03-26 22:16:27 +0000 |
|---|---|---|
| committer | Phlip Knouff <philip.knouff@mailtrust.com> | 2012-03-28 15:52:28 +0000 |
| commit | 497502cbf833d063c964975448dfacd0e1db2ef4 (patch) | |
| tree | fc15dfb9d608d308ff7600b9e26aed53d87955a7 /nova/tests | |
| parent | 930be36538e42effc0a3b03c9a3d8a06cb1693ed (diff) | |
Fix marker behavior for flavors
Fixes Bug #956096
Change-Id: Ifa94a70f2aec3b9527c291e27d4710336a1d1834
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/compute/test_flavors.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nova/tests/api/openstack/compute/test_flavors.py b/nova/tests/api/openstack/compute/test_flavors.py index 7d03a62c0..599e86bc1 100644 --- a/nova/tests/api/openstack/compute/test_flavors.py +++ b/nova/tests/api/openstack/compute/test_flavors.py @@ -195,6 +195,34 @@ class FlavorsTest(test.TestCase): } self.assertEqual(flavor, expected) + def test_get_flavor_list_with_marker(self): + self.maxDiff = None + req = fakes.HTTPRequest.blank('/v2/fake/flavors?limit=1&marker=1') + flavor = self.controller.index(req) + expected = { + "flavors": [ + { + "id": "2", + "name": "flavor 2", + "links": [ + { + "rel": "self", + "href": "http://localhost/v2/fake/flavors/2", + }, + { + "rel": "bookmark", + "href": "http://localhost/fake/flavors/2", + }, + ], + }, + ], + 'flavors_links': [ + {'href': 'http://localhost/v2/fake/flavors?limit=1&marker=2', + 'rel': 'next'} + ] + } + self.assertDictMatch(flavor, expected) + def test_get_flavor_detail_with_limit(self): req = fakes.HTTPRequest.blank('/v2/fake/flavors/detail?limit=1') response = self.controller.index(req) |
