diff options
-rw-r--r-- | functest/tests/unit/utils/test_decorators.py | 2 | ||||
-rw-r--r-- | functest/utils/functest_utils.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/functest/tests/unit/utils/test_decorators.py b/functest/tests/unit/utils/test_decorators.py index 6bd47d25c..44448f238 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') diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index 284c79719..dc20eea10 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -221,7 +221,8 @@ def push_results_to_db(project, case_name, 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: |