Merge "normalize the json output of show a given extension."
This commit is contained in:
commit
746f8b74e1
@ -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