diff options
author | 2017-05-21 10:13:45 +0200 | |
---|---|---|
committer | 2017-05-21 10:17:43 +0200 | |
commit | bdf5048343f9d3f419bbd16dfb219fa79a9ad694 (patch) | |
tree | 235a2a067faaf43080c779cad86d5c55f01bed57 /functest/tests/unit/utils/test_decorators.py | |
parent | cd4e945a2c7246ed27027bcfabfa33fd82a918a9 (diff) |
Sort keys when dumping json
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>
Diffstat (limited to 'functest/tests/unit/utils/test_decorators.py')
-rw-r--r-- | functest/tests/unit/utils/test_decorators.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/functest/tests/unit/utils/test_decorators.py b/functest/tests/unit/utils/test_decorators.py index 6bd47d25..44448f23 100644 --- a/functest/tests/unit/utils/test_decorators.py +++ b/functest/tests/unit/utils/test_decorators.py @@ -63,7 +63,7 @@ class DecoratorsTesting(unittest.TestCase): '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') |