Merge "normalize the json output of show a given extension."

This commit is contained in:
Jenkins 2012-08-13 04:54:15 +00:00 committed by Gerrit Code Review
commit 746f8b74e1
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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")