Update json module to jsonutils
oslo project provide jsonutils, and octavia use it in many place[1], this PS to update the remained json moudule to oslo jsonutils for consistency. [1]: https://github.com/openstack/octavia/search?utf8=%E2%9C%93&q=jsonutils&type= Change-Id: I90241a750d4a36291bc97753d61e723193eb12d5
This commit is contained in:
parent
dfb5fadc50
commit
467605ffe8
|
@ -14,10 +14,11 @@
|
|||
#
|
||||
|
||||
import copy
|
||||
import json
|
||||
import mock
|
||||
import sys
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystoneauth1 import fixture
|
||||
import requests
|
||||
import six
|
||||
|
@ -242,7 +243,7 @@ class FakeResponse(requests.Response):
|
|||
self.status_code = status_code
|
||||
|
||||
self.headers.update(headers)
|
||||
self._content = json.dumps(data)
|
||||
self._content = jsonutils.dumps(data)
|
||||
if not isinstance(self._content, six.binary_type):
|
||||
self._content = self._content.encode()
|
||||
|
||||
|
|
Loading…
Reference in New Issue