From 43a06a955c3cabdc2222f6523c6564fc76926136 Mon Sep 17 00:00:00 2001 From: Pradeep Srikakolapu Date: Sun, 19 May 2024 14:56:03 -0700 Subject: [PATCH] Updating tests for 1.8.0 version --- tests/functional/adapter/test_constraints.py | 2 -- tests/functional/adapter/test_dbt_clone.py | 3 --- tests/functional/adapter/test_query_comment.py | 7 +++---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/functional/adapter/test_constraints.py b/tests/functional/adapter/test_constraints.py index ed7ed9f..6ff5265 100644 --- a/tests/functional/adapter/test_constraints.py +++ b/tests/functional/adapter/test_constraints.py @@ -44,7 +44,6 @@ description: hello constraints: - type: not_null - - type: primary_key - type: unique - type: check expression: (id > 0) @@ -92,7 +91,6 @@ description: hello constraints: - type: not_null - - type: primary_key - type: check expression: (id > 0) tests: diff --git a/tests/functional/adapter/test_dbt_clone.py b/tests/functional/adapter/test_dbt_clone.py index 29d5009..03108a5 100644 --- a/tests/functional/adapter/test_dbt_clone.py +++ b/tests/functional/adapter/test_dbt_clone.py @@ -84,17 +84,14 @@ def copy_state(self, project_root): def run_and_save_state(self, project_root, with_snapshot=False): results = run_dbt(["seed"]) assert len(results) == 1 - assert not any(r.node.deferred for r in results) results = run_dbt(["run"]) assert len(results) == 2 - assert not any(r.node.deferred for r in results) results = run_dbt(["test"]) assert len(results) == 2 if with_snapshot: results = run_dbt(["snapshot"]) assert len(results) == 1 - assert not any(r.node.deferred for r in results) # copy files self.copy_state(project_root) diff --git a/tests/functional/adapter/test_query_comment.py b/tests/functional/adapter/test_query_comment.py index 1488274..7e4781a 100644 --- a/tests/functional/adapter/test_query_comment.py +++ b/tests/functional/adapter/test_query_comment.py @@ -1,3 +1,5 @@ +import json + from dbt.tests.adapter.query_comment.test_query_comment import ( BaseEmptyQueryComments, BaseMacroArgsQueryComments, @@ -6,8 +8,6 @@ BaseNullQueryComments, BaseQueryComments, ) -from dbt.version import __version__ as dbt_version -import json # Tests # @@ -20,11 +20,10 @@ class TestMacroQueryComments(BaseMacroQueryComments): class TestMacroArgsQueryComments(BaseMacroArgsQueryComments): - def test_matches_comment(self, project) -> bool: + def test_matches_comment(self, project): 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}", }