Newer
Older
Houcem Kacem
committed
from deepdiff import DeepDiff
def compare_dictionaries_ignoring_keys(dict1, dict2, exclude_regex_paths):
"""Function exposed as a keyword to compare two dictionaries
:param dict1: actual dictionary
:param dict2: expected dictionary
Houcem Kacem
committed
:param exclude_regex_paths: regex path of keys to be ignored
Houcem Kacem
committed
"""
res = DeepDiff(dict1, dict2, exclude_regex_paths=[exclude_regex_paths], ignore_order=True)
print(res)
Houcem Kacem
committed
return not res