Skip to content

Commit

Permalink
sort as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
legoguy1000 committed May 12, 2021
1 parent 7616548 commit ffd2a18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filebeat/tests/system/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def _test_expected_events(self, test_file, objects):
objects[k] = self.flatten_object(obj, {}, "")
clean_keys(objects[k])
for key in objects[k].keys():
if isinstance(objects[k][key], list) and len(objects[k][key]) > 0 and not isinstance(objects[k][key][0], dict):
objects[k][key].sort()
if isinstance(objects[k][key], list):
objects[k][key].sort(key=str)

json.dump(objects, f, indent=4, separators=(',', ': '), sort_keys=True)

Expand Down

0 comments on commit ffd2a18

Please sign in to comment.