From cb4a95392fe3156bf7bdf8e8e71d4fa3fab07675 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 1 Oct 2024 18:54:02 +0100 Subject: [PATCH] Fix hook tests (#153) --- .changes/1.9.0-b1.md | 1 - tests/functional/schema_tests/test_schema_v2_tests.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.changes/1.9.0-b1.md b/.changes/1.9.0-b1.md index 9a06cee4..59bd21c5 100644 --- a/.changes/1.9.0-b1.md +++ b/.changes/1.9.0-b1.md @@ -28,4 +28,3 @@ - [@morsapaes](https://github.com/morsapaes) ([#120](https://github.com/dbt-labs/dbt-postgres/issues/120)) - [@peterallenwebb](https://github.com/peterallenwebb) ([#123](https://github.com/dbt-labs/dbt-postgres/issues/123)) - [@versusfacit](https://github.com/versusfacit) ([#85](https://github.com/dbt-labs/dbt-postgres/issues/85)) - diff --git a/tests/functional/schema_tests/test_schema_v2_tests.py b/tests/functional/schema_tests/test_schema_v2_tests.py index aae164a1..68158efd 100644 --- a/tests/functional/schema_tests/test_schema_v2_tests.py +++ b/tests/functional/schema_tests/test_schema_v2_tests.py @@ -472,9 +472,9 @@ def test_hooks_do_run_for_tests( ): # This passes now that hooks run, a behavior we changed in v1.0 results = run_dbt(["test", "--model", "ephemeral"]) - assert len(results) == 1 + assert len(results) == 3 for result in results: - assert result.status == "pass" + assert result.status in ("pass", "success") assert not result.skipped assert result.failures == 0, "test {} failed".format(result.node.name) @@ -505,9 +505,9 @@ def test_these_hooks_dont_run_for_tests( ): # This would fail if the hooks ran results = run_dbt(["test", "--model", "ephemeral"]) - assert len(results) == 1 + assert len(results) == 3 for result in results: - assert result.status == "pass" + assert result.status in ("pass", "success") assert not result.skipped assert result.failures == 0, "test {} failed".format(result.node.name)