From c1a59edbe7c425b00407f35ee01330cf808b351a Mon Sep 17 00:00:00 2001 From: Mila Page Date: Mon, 26 Feb 2024 22:52:54 -0800 Subject: [PATCH] Add test to restore transactions behavior. --- tests/unit/test_renamed_relations.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/unit/test_renamed_relations.py diff --git a/tests/unit/test_renamed_relations.py b/tests/unit/test_renamed_relations.py new file mode 100644 index 00000000..8389ce05 --- /dev/null +++ b/tests/unit/test_renamed_relations.py @@ -0,0 +1,15 @@ +from dbt.adapters.redshift.relation import RedshiftRelation +from dbt.adapters.contracts.relation import RelationType + + +def test_renameable_relation(): + relation = RedshiftRelation.create( + database="my_db", + schema="my_schema", + identifier="my_table", + type=RelationType.Table, + ) + assert relation.renameable_relations == frozenset({ + RelationType.View, + RelationType.Table + })