Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tests_api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
tests_api
Compare revisions
820b1f1d87dea8305324ed3718babe7006c269ec to 1ae2a4b1367139e7954b31596eaa4bf65e6aa68e
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
hive/tests_api
Select target project
No results found
1ae2a4b1367139e7954b31596eaa4bf65e6aa68e
Select Git revision
Branches
2mln_blocks_test
abw_rshares_experiment
bridge_get_account_posts
bw_ci_validating_test
bw_list_comments_by_permlink_opt_patterns
dk-5e6-patterns
dk-database-api-tests-001
dk-diff-log
dk-fix-order-in-some-tests
dk-follow-item-overwrite-fix
dk-follow-refactor
dk-functional-example
dk-list-votes-pre24
dk-mock-follow-tests
dk-mock-follow-tests-2
dk-mock-vops-tests
dk-pytest-benchmark
follow_api_tests
get_accounts
get_blog_entries
get_ranked_posts
issue_37_trend_and_hot
jsalyers-more-blacklist-updates
klesniak-api-tests-pyresttests
km_hafah_MR15
km_issue_151_revert
kmochocki/add-slow-call
kmochocki/ci
kmochocki/hivemind-testing
kudmich/prepare_tavern_tests_to_working_with_postgrest
master
mi_correct_notif_cache_update
mi_mention_date_changed
mi_notifications_in_cache
mi_test_for_bridge_get_ranked_posts
msochacki_tests
mt-47
mt-find-list-votes
mt-further-pids-refactoring
mt-further-pids-refactoring-old
mt-get-pids-fix
mt-get-profile-new-patterns
mt-grayed
mt-lack-of-post-forces-empty-pattern
mt-list-comments-fix
mt-main-unit
mt-pids-performance-refactoring
mz-hivemind-benchmark-parser
pczempiel_community
pczempiel_date_changes
pczempiel_new_tests
pmaniora_account_notifications_tests
pmaniora_communities_sql
pmaniora_community_fixes
pmaniora_fullsync_slow_calls
pmaniora_new_tests
request-execution-time
revert-36610d67
tmp
59 results
Swap
Target
hive/tests_api
Select target project
hive/tests_api
1 result
820b1f1d87dea8305324ed3718babe7006c269ec
Select Git revision
Branches
2mln_blocks_test
abw_rshares_experiment
bridge_get_account_posts
bw_ci_validating_test
bw_list_comments_by_permlink_opt_patterns
dk-5e6-patterns
dk-database-api-tests-001
dk-diff-log
dk-fix-order-in-some-tests
dk-follow-item-overwrite-fix
dk-follow-refactor
dk-functional-example
dk-list-votes-pre24
dk-mock-follow-tests
dk-mock-follow-tests-2
dk-mock-vops-tests
dk-pytest-benchmark
follow_api_tests
get_accounts
get_blog_entries
get_ranked_posts
issue_37_trend_and_hot
jsalyers-more-blacklist-updates
klesniak-api-tests-pyresttests
km_hafah_MR15
km_issue_151_revert
kmochocki/add-slow-call
kmochocki/ci
kmochocki/hivemind-testing
kudmich/prepare_tavern_tests_to_working_with_postgrest
master
mi_correct_notif_cache_update
mi_mention_date_changed
mi_notifications_in_cache
mi_test_for_bridge_get_ranked_posts
msochacki_tests
mt-47
mt-find-list-votes
mt-further-pids-refactoring
mt-further-pids-refactoring-old
mt-get-pids-fix
mt-get-profile-new-patterns
mt-grayed
mt-lack-of-post-forces-empty-pattern
mt-list-comments-fix
mt-main-unit
mt-pids-performance-refactoring
mz-hivemind-benchmark-parser
pczempiel_community
pczempiel_date_changes
pczempiel_new_tests
pmaniora_account_notifications_tests
pmaniora_communities_sql
pmaniora_community_fixes
pmaniora_fullsync_slow_calls
pmaniora_new_tests
request-execution-time
revert-36610d67
tmp
59 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Only pattern check is disabled, other checks are valid
· 1ae2a4b1
Dariusz Kędzierski
authored
4 years ago
1ae2a4b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hivemind/tavern/validate_response.py
+4
-3
4 additions, 3 deletions
hivemind/tavern/validate_response.py
with
4 additions
and
3 deletions
hivemind/tavern/validate_response.py
View file @
1ae2a4b1
...
@@ -36,9 +36,6 @@ def remove_tag(data, tags_to_remove):
...
@@ -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
):
def
compare_response_with_pattern
(
response
,
method
=
None
,
directory
=
None
,
ignore_tags
=
None
,
error_response
=
False
):
"""
This method will compare response with pattern file
"""
"""
This method will compare response with pattern file
"""
import
os
import
os
# disable coparison with pattern on demand
if
bool
(
os
.
getenv
(
'
TAVERN_DISABLE_COMPARATOR
'
,
False
)):
return
response_fname
=
directory
+
"
/
"
+
method
+
RESPONSE_FILE_EXT
response_fname
=
directory
+
"
/
"
+
method
+
RESPONSE_FILE_EXT
if
os
.
path
.
exists
(
response_fname
):
if
os
.
path
.
exists
(
response_fname
):
...
@@ -67,6 +64,10 @@ def compare_response_with_pattern(response, method=None, directory=None, ignore_
...
@@ -67,6 +64,10 @@ def compare_response_with_pattern(response, method=None, directory=None, ignore_
save_json
(
response_fname
,
response_json
)
save_json
(
response_fname
,
response_json
)
raise
PatternDiffException
(
msg
)
raise
PatternDiffException
(
msg
)
# disable coparison with pattern on demand
if
bool
(
os
.
getenv
(
'
TAVERN_DISABLE_COMPARATOR
'
,
False
)):
return
import
deepdiff
import
deepdiff
pattern
=
load_pattern
(
directory
+
"
/
"
+
method
+
PATTERN_FILE_EXT
)
pattern
=
load_pattern
(
directory
+
"
/
"
+
method
+
PATTERN_FILE_EXT
)
if
ignore_tags
is
not
None
:
if
ignore_tags
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.