Skip to content

Commit

Permalink
Remove the test for the route '/resources.:(format)'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
soulxu committed Jul 12, 2017
1 parent 53393ca commit 156fe42
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions nova/tests/unit/api/openstack/compute/test_urlmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ def test_accept_version_v2(self):
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'
Expand Down

0 comments on commit 156fe42

Please sign in to comment.