Skip to content

Commit

Permalink
Remove escapes for json log string matching
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Sep 13, 2023
1 parent 1fd1864 commit 3d116b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/functional/show/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def test_numeric_values(self, project):
(_, log_output) = run_dbt_and_capture(
["show", "--select", "sample_number_model", "--output", "json"]
)
# json log output needs the escapes removed for string matching
log_output = log_output.replace("\\", "")
assert "Previewing node 'sample_number_model'" not in log_output
assert '"float_to_int_field": 1.0' not in log_output
assert '"float_to_int_field": 1' in log_output
Expand All @@ -97,6 +99,8 @@ def test_numeric_values_with_nulls(self, project):
(_, log_output) = run_dbt_and_capture(
["show", "--select", "sample_number_model_with_nulls", "--output", "json"]
)
# json log output needs the escapes removed for string matching
log_output = log_output.replace("\\", "")
assert "Previewing node 'sample_number_model_with_nulls'" not in log_output
assert '"float_to_int_field": 1.0' not in log_output
assert '"float_to_int_field": 1' in log_output
Expand Down

0 comments on commit 3d116b3

Please sign in to comment.