Skip to content

Commit 0b3a0c0

Browse files
committed
feature: json_equals function (wrapper around comparing 2 strings from json.dumps)
1 parent 9a69ec6 commit 0b3a0c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ibmsecurity/utilities/tools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,15 @@ def normalize(v):
315315

316316
def json_equals(curObj, newObj, ignore_keys_not_in_new=True, skipkeys=True, sort_keys=True):
317317
"""
318+
Function to compare input and output (for idempotency)
319+
320+
318321
:param curObj: The current object as output from an ISAMAppliance function
319322
:param newObj: The input json data
320323
:param ignore_keys_not_in_new: Filter current values for keys that are in the new object. This is not fully idempotent (because it will keep values that are not defined in the input)
321324
:return: boolean: True if the 2 objects are the same
325+
326+
TODO: include the custom class
322327
"""
323328
# Verify format
324329
if curObj.get("data", None) is None:

0 commit comments

Comments
 (0)