Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hive/tests_api
1 result
Show changes
Commits on Source (1)
......@@ -36,9 +36,6 @@ def remove_tag(data, tags_to_remove):
def compare_response_with_pattern(response, method=None, directory=None, ignore_tags=None, error_response=False):
""" This method will compare response with pattern file """
import os
# disable coparison with pattern on demand
if bool(os.getenv('TAVERN_DISABLE_COMPARATOR', False)):
return
response_fname = directory + "/" + method + RESPONSE_FILE_EXT
if os.path.exists(response_fname):
......@@ -67,6 +64,10 @@ def compare_response_with_pattern(response, method=None, directory=None, ignore_
save_json(response_fname, response_json)
raise PatternDiffException(msg)
# disable coparison with pattern on demand
if bool(os.getenv('TAVERN_DISABLE_COMPARATOR', False)):
return
import deepdiff
pattern = load_pattern(directory + "/" + method + PATTERN_FILE_EXT)
if ignore_tags is not None:
......