Enfore key sorting for serializers
The sorting of keys is not enforced, which is causing some mismatches for some strict testing. This patch enforce the sorting of keys when doing JSON dumps. Change-Id: I31ce5fa5e753cbf287429ad689752353530a4b4f
This commit is contained in:
parent
9086166e93
commit
7ddbbd21e0
|
@ -31,7 +31,7 @@ class JSONResponseSerializer(object):
|
|||
return obj.isoformat()
|
||||
return obj
|
||||
|
||||
response = json.dumps(data, default=sanitizer)
|
||||
response = json.dumps(data, default=sanitizer, sort_keys=True)
|
||||
LOG.debug("JSON response : %s" % response)
|
||||
return response
|
||||
|
||||
|
|
Loading…
Reference in New Issue