Skip to content

Commit

Permalink
fix test query
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiurin committed Jan 17, 2024
1 parent 7256191 commit 525a0c5
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions tests/functional/adapter/test_query_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,21 @@
from dbt.version import __version__ as dbt_version


class FireboltTestFixMixin:
"""
Fixing Base class test_comments method to actually
assert that the logs contain the expected string.
"""

def test_comments(self, project):
logs = self.run_assert_comments()
self.matches_comment(logs)


class TestQueryCommentsFirebolt(FireboltTestFixMixin, BaseQueryComments):
def matches_comment(self, logs) -> bool:
class TestQueryCommentsFirebolt(BaseQueryComments):
def test_matches_comment(self, project) -> bool:
logs = self.run_get_json()
assert '\\n/* dbt\\nrules! */' in logs


class TestMacroQueryCommentsFirebolt(FireboltTestFixMixin, BaseMacroQueryComments):
def matches_comment(self, logs) -> bool:
class TestMacroQueryCommentsFirebolt(BaseMacroQueryComments):
def test_matches_comment(self, project) -> bool:
logs = self.run_get_json()
assert '\\n/* dbt macros\\nare pretty cool */' in logs


class TestMacroArgsQueryCommentsFirebolt(
FireboltTestFixMixin, BaseMacroArgsQueryComments
):
def matches_comment(self, logs) -> bool:
class TestMacroArgsQueryCommentsFirebolt(BaseMacroArgsQueryComments):
def test_matches_comment(self, project) -> bool:
logs = self.run_get_json()
expected_dct = {
'app': 'dbt++',
'dbt_version': dbt_version,
Expand All @@ -52,9 +42,9 @@ class TestMacroInvalidQueryCommentsFirebolt(BaseMacroInvalidQueryComments):
pass


class TestNullQueryCommentsFirebolt(FireboltTestFixMixin, BaseNullQueryComments):
class TestNullQueryCommentsFirebolt(BaseNullQueryComments):
pass


class TestEmptyQueryCommentsFirebolt(FireboltTestFixMixin, BaseEmptyQueryComments):
class TestEmptyQueryCommentsFirebolt(BaseEmptyQueryComments):
pass

0 comments on commit 525a0c5

Please sign in to comment.