normalize the json output of show a given extension.
we should use {'extension':{}} for a given extension query to comply with our API design. Change-Id: Id0b04b29bed4be92498c04178e268c31e9a1d635
This commit is contained in:
parent
ce8f2bd61d
commit
b614183592
@ -221,7 +221,7 @@ class ExtensionController(wsgi.Controller):
|
||||
if not ext:
|
||||
raise webob.exc.HTTPNotFound(
|
||||
_("Extension with alias %s does not exist") % id)
|
||||
return self._translate(ext)
|
||||
return dict(extension=self._translate(ext))
|
||||
|
||||
def delete(self, request, id):
|
||||
raise webob.exc.HTTPNotFound()
|
||||
|
@ -454,7 +454,7 @@ class ExtensionControllerTest(unittest.TestCase):
|
||||
|
||||
def test_extension_can_be_accessed_by_alias(self):
|
||||
foxnsox_extension = self.test_app.get("/extensions/FOXNSOX").json
|
||||
|
||||
foxnsox_extension = foxnsox_extension['extension']
|
||||
self.assertEqual(foxnsox_extension["alias"], "FOXNSOX")
|
||||
self.assertEqual(foxnsox_extension["namespace"],
|
||||
"http://www.fox.in.socks/api/ext/pie/v1.0")
|
||||
|
Loading…
Reference in New Issue
Block a user