Skip to content

Commit 278cbb7

Browse files
authored
fix tests/functional/adapter/test_query_comment.py::TestMacroArgsQueryComments::test_matches_comment to use correct dbt_version (ref dbt-labs/dbt-core)
1 parent e1523c7 commit 278cbb7

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

tests/functional/adapter/test_query_comment.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
BaseNullQueryComments,
77
BaseQueryComments,
88
)
9+
from dbt.version import __version__ as dbt_version
10+
import json
911

1012

1113
# Tests #
@@ -18,7 +20,18 @@ class TestMacroQueryComments(BaseMacroQueryComments):
1820

1921

2022
class TestMacroArgsQueryComments(BaseMacroArgsQueryComments):
21-
pass
23+
def test_matches_comment(self, project) -> bool:
24+
logs = self.run_get_json()
25+
expected_dct = {
26+
"app": "dbt++",
27+
"dbt_version": dbt_version,
28+
"macro_version": "0.1.0",
29+
"message": f"blah: {project.adapter.config.target_name}",
30+
}
31+
expected = r"/* {} */\n".format(json.dumps(expected_dct, sort_keys=True)).replace(
32+
'"', r"\""
33+
)
34+
assert expected in logs
2235

2336

2437
class TestMacroInvalidQueryComments(BaseMacroInvalidQueryComments):

0 commit comments

Comments
 (0)