From aa29a67d5cecfa320f98fa9989bf0b9179240016 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Fri, 23 Mar 2012 20:27:34 +0000 Subject: makes volume versions display properly * The compute versions controller changed during a refactor and broke the volume versions controller (since we are using it as a base class) * Added naive test * fixes bug 963357 Change-Id: Ica9c65952b800d316d264db11f89e369e56bcade --- nova/tests/api/openstack/volume/test_router.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/api/openstack/volume/test_router.py b/nova/tests/api/openstack/volume/test_router.py index 1f37ab7a1..8d6cf1e78 100644 --- a/nova/tests/api/openstack/volume/test_router.py +++ b/nova/tests/api/openstack/volume/test_router.py @@ -17,6 +17,7 @@ from nova.api.openstack import volume from nova.api.openstack.volume import snapshots from nova.api.openstack.volume import volumes +from nova.api.openstack.volume import versions from nova.api.openstack import wsgi from nova import flags from nova import log as logging @@ -60,6 +61,14 @@ class VolumeRouterTestCase(test.TestCase): response = req.get_response(self.app) self.assertEqual(200, response.status_int) + def test_versions_dispatch(self): + req = fakes.HTTPRequest.blank('/') + req.method = 'GET' + req.content_type = 'application/json' + resource = versions.Versions() + result = resource.dispatch(resource.index, req, {}) + self.assertTrue(result) + def test_volumes(self): req = fakes.HTTPRequest.blank('/fake/volumes') req.method = 'GET' -- cgit