From c09b81dce9a2a111f77142d76593557d259826a1 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Tue, 3 Oct 2023 13:02:44 -0400 Subject: [PATCH] update object names for generic test case tests for store_failures_as --- .../store_test_failures_tests/_files.py | 34 +++++++++---------- .../store_test_failures_tests/basic.py | 10 +++--- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/tests/adapter/dbt/tests/adapter/store_test_failures_tests/_files.py b/tests/adapter/dbt/tests/adapter/store_test_failures_tests/_files.py index d08e9885cd1..71688ecbce3 100644 --- a/tests/adapter/dbt/tests/adapter/store_test_failures_tests/_files.py +++ b/tests/adapter/dbt/tests/adapter/store_test_failures_tests/_files.py @@ -105,24 +105,24 @@ version: 2 models: -- name: chipmunks + - name: chipmunks columns: - - name: str + - name: name tests: - - unique: - store_failures: true - - not_null: - store_failures_as: view - - accepted_values: - store_failures: false - store_failures_as: table - values: - - alvin - - simon - - theodore - - shirt: str + - unique: + store_failures: true + - not_null: + store_failures_as: view + - accepted_values: + store_failures: false + store_failures_as: table + values: + - alvin + - simon + - theodore + - name: shirt tests: - - not_null: - store_failures: true - store_failures_as: view + - not_null: + store_failures: true + store_failures_as: view """ diff --git a/tests/adapter/dbt/tests/adapter/store_test_failures_tests/basic.py b/tests/adapter/dbt/tests/adapter/store_test_failures_tests/basic.py index aebe6549adb..bef78e7f8e5 100644 --- a/tests/adapter/dbt/tests/adapter/store_test_failures_tests/basic.py +++ b/tests/adapter/dbt/tests/adapter/store_test_failures_tests/basic.py @@ -267,10 +267,12 @@ def models(self): def test_tests_run_successfully_and_are_stored_as_expected(self, project): expected_results = { - TestResult("name__unique", TestStatus.Pass, "table"), - TestResult("name__not_null", TestStatus.Pass, "view"), - TestResult("name__accepted_values", TestStatus.Fail, "table"), - TestResult("shirt__not_null", TestStatus.Fail, "view"), + TestResult("unique_chipmunks_name", TestStatus.Pass, "table"), + TestResult("not_null_chipmunks_name", TestStatus.Pass, "view"), + TestResult( + "accepted_values_chipmunks_name__alvin__simon__theodore", TestStatus.Fail, "table" + ), + TestResult("not_null_chipmunks_shirt", TestStatus.Fail, "view"), } # run the tests