From 156fe42d8d151e5b89afe99def666bb9a4431e70 Mon Sep 17 00:00:00 2001 From: He Jie Xu Date: Thu, 29 Jun 2017 18:25:28 +0800 Subject: [PATCH] Remove the test for the route '/resources.:(format)' Requesting the specific format response should be done by HTTP header 'ACCEPT'. The way of '/resources.:(format)' doesn't support or doc in the Nova API officially. And all of those kind of URL routes are removed in the Pike release. This patch removes the related unittest. Partial-implement-blueprint api-no-more-extensions-pike Change-Id: I2bda2087ba1f07f6ec0f65713ce75234ff00c0df --- nova/tests/unit/api/openstack/compute/test_urlmap.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/nova/tests/unit/api/openstack/compute/test_urlmap.py b/nova/tests/unit/api/openstack/compute/test_urlmap.py index 41ec54afb2..9e619cd4c3 100644 --- a/nova/tests/unit/api/openstack/compute/test_urlmap.py +++ b/nova/tests/unit/api/openstack/compute/test_urlmap.py @@ -60,18 +60,6 @@ class UrlmapTest(test.NoDBTestCase): body = jsonutils.loads(res.body) self.assertEqual('v2.0', body['version']['id']) - def test_path_content_type(self): - # Test URL path specifying JSON returns JSON content. - url = '/v2/fake/images/cedef40a-ed67-4d10-800e-17455edce175.json' - req = fakes.HTTPRequest.blank(url) - req.accept = "application/xml" - res = req.get_response(fakes.wsgi_app_v21()) - self.assertEqual(200, res.status_int) - self.assertEqual("application/json", res.content_type) - body = jsonutils.loads(res.body) - self.assertEqual('cedef40a-ed67-4d10-800e-17455edce175', - body['image']['id']) - def test_accept_content_type(self): # Test Accept header specifying JSON returns JSON content. url = '/v2/fake/images/cedef40a-ed67-4d10-800e-17455edce175'