Otherwise dumping them could break some unit tests as they are
unordered collections [1].
[1] https://build.opnfv.org/ci/job/functest-verify-master/4122/
Change-Id: I108e946926ae9690cf2421e565f2bb81500f9160
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
'pod_name': self._node_name, 'installer': self._installer_type,
'scenario': self._deploy_scenario, 'version': VERSION,
'details': {}, 'criteria': self._result}
- return json.dumps(data)
+ return json.dumps(data, sort_keys=True)
@mock.patch('{}.get_db_url'.format(functest_utils.__name__),
return_value='http://127.0.0.1')
error = None
headers = {'Content-Type': 'application/json'}
try:
- r = requests.post(url, data=json.dumps(params), headers=headers)
+ r = requests.post(url, data=json.dumps(params, sort_keys=True),
+ headers=headers)
logger.debug(r)
r.raise_for_status()
except requests.RequestException as exc: