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
:param exclude_regex_paths: list of regex paths of keys to be ignored
Houcem Kacem
committed
"""
res = DeepDiff(dict1, dict2, exclude_regex_paths=exclude_regex_paths, ignore_order=True)
Houcem Kacem
committed
print(res)
Houcem Kacem
committed
return not res