Fix response of database Limits & Versions client

This patch converts the json response returned to python object before
passing to ResponseBody.

Change-Id: Ic616b718b5bdcfb18e141548fd00ea59320f5b5d
This commit is contained in:
Anusha Ramineni
2015-08-28 12:37:29 +05:30
parent 3b1bb9be32
commit 2e2ba0c995
2 changed files with 4 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_serialization import jsonutils as json
from six.moves.urllib import parse as urllib
from tempest.common import service_client
@@ -27,4 +28,5 @@ class DatabaseLimitsClient(service_client.ServiceClient):
url += '?%s' % urllib.urlencode(params)
resp, body = self.get(url)
self.expected_success(200, resp.status)
body = json.loads(body)
return service_client.ResponseBody(resp, body)

View File

@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from oslo_serialization import jsonutils as json
from six.moves.urllib import parse as urllib
from tempest.common import service_client
@@ -43,4 +44,5 @@ class DatabaseVersionsClient(service_client.ServiceClient):
resp, body = self.get(url)
self.expected_success(200, resp.status)
body = json.loads(body)
return service_client.ResponseBody(resp, body)