Skip to content

Commit

Permalink
fix tests/functional/adapter/test_query_comment.py::TestMacroArgsQuer…
Browse files Browse the repository at this point in the history
…yComments::test_matches_comment to use correct dbt_version (ref dbt-labs/dbt-core)
  • Loading branch information
arthurcht authored Mar 1, 2024
1 parent e1523c7 commit 278cbb7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/functional/adapter/test_query_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
BaseNullQueryComments,
BaseQueryComments,
)
from dbt.version import __version__ as dbt_version
import json


# Tests #
Expand All @@ -18,7 +20,18 @@ class TestMacroQueryComments(BaseMacroQueryComments):


class TestMacroArgsQueryComments(BaseMacroArgsQueryComments):
pass
def test_matches_comment(self, project) -> bool:
logs = self.run_get_json()
expected_dct = {
"app": "dbt++",
"dbt_version": dbt_version,
"macro_version": "0.1.0",
"message": f"blah: {project.adapter.config.target_name}",
}
expected = r"/* {} */\n".format(json.dumps(expected_dct, sort_keys=True)).replace(
'"', r"\""
)
assert expected in logs


class TestMacroInvalidQueryComments(BaseMacroInvalidQueryComments):
Expand Down

0 comments on commit 278cbb7

Please sign in to comment.